From 07b0fab7208919c3fc0af5cea019dea782c61b75 Mon Sep 17 00:00:00 2001 From: Denis Makogon Date: Tue, 18 Jul 2017 13:40:54 -0700 Subject: [PATCH] Fix unexpected failure when trying to update route with exact the same attributes --- api/datastore/sql/sql.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/api/datastore/sql/sql.go b/api/datastore/sql/sql.go index 95e142237..8e8055761 100644 --- a/api/datastore/sql/sql.go +++ b/api/datastore/sql/sql.go @@ -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