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

This commit is contained in:
Denis Makogon
2017-07-18 13:40:54 -07:00
committed by Reed Allman
parent fea44b0dbf
commit 07b0fab720

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