Merge branch '114' into 'master'

Fix unexpected failure when trying to update route with exact the same attributes

Closes #114 and #102

See merge request !111
This commit is contained in:
Reed Allman
2017-07-18 13:40:54 -07:00

View File

@@ -395,7 +395,8 @@ func (ds *sqlStore) UpdateRoute(ctx context.Context, newroute *models.Route) (*m
if n, err := res.RowsAffected(); err != nil {
return err
} else if n == 0 {
return models.ErrRoutesNotFound
// inside of the transaction, we are querying for the row, so we know that it exists
return nil
}
return nil