Skip to content

Commit

Permalink
Merge pull request #1346 from hyperledger/ffi-conflict
Browse files Browse the repository at this point in the history
Fix uniqueness check in InsertOrGetFFI to match indexes
  • Loading branch information
peterbroadhurst authored Jun 19, 2023
2 parents 2fbd5b6 + 197c4d4 commit fbd88de
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/database/sqlcommon/ffi_sql.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,8 @@ func (s *SQLCommon) InsertOrGetFFI(ctx context.Context, ffi *fftypes.FFI) (exist
sq.Eq{"namespace": ffi.Namespace},
sq.Or{
sq.Eq{"id": ffi.ID},
sq.Eq{"name": ffi.Name},
sq.Eq{"network_name": ffi.NetworkName},
sq.Eq{"name": ffi.Name, "version": ffi.Version},
sq.Eq{"network_name": ffi.NetworkName, "version": ffi.Version},
},
})
if queryErr != nil || existing != nil {
Expand Down

0 comments on commit fbd88de

Please sign in to comment.