Skip to content

Commit ed1ecee

Browse files
committed
fix(#255): Update with duplicate names
1 parent 02ff001 commit ed1ecee

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

x/cardchain/keeper/msg_server_encounter_create.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ func (k Keeper) validateEncounter(ctx sdk.Context, encounter *types.Encounter, c
6161
for ; iter.Valid(); iter.Next() {
6262
_, e := iter.Value()
6363

64-
if e.Name == encounter.Name {
64+
if e.Name == encounter.Name && e.Id != encounter.Id {
6565
return errorsmod.Wrapf(
6666
errors.ErrUnauthorized,
6767
"encounter with same name already exists and is owned by '%s'",

0 commit comments

Comments
 (0)