Skip to content

Commit

Permalink
fix: attempt fix regression of b35adb7 (#98)
Browse files Browse the repository at this point in the history
  • Loading branch information
budak7273 authored Oct 18, 2024
1 parent 179d261 commit 4a7c0af
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion gql/resolver_mods.go
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,10 @@ func (r *mutationResolver) UpdateMod(ctx context.Context, modID string, updateMo
return nil, errors.New("this mod already has set a mod reference")
}

dbUpdate := dbMod.Update().ClearTags().AddTagIDs(updateMod.TagIDs...)
dbUpdate := dbMod.Update()
if updateMod.TagIDs != nil {
dbUpdate.ClearTags().AddTagIDs(updateMod.TagIDs...)
}

SetINNOEF(updateMod.Name, dbUpdate.SetName)
SetINNOEF(updateMod.ShortDescription, dbUpdate.SetShortDescription)
Expand Down

0 comments on commit 4a7c0af

Please sign in to comment.