Skip to content

Commit 4a7c0af

Browse files
authored
fix: attempt fix regression of b35adb7 (#98)
1 parent 179d261 commit 4a7c0af

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

gql/resolver_mods.go

+4-1
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,10 @@ func (r *mutationResolver) UpdateMod(ctx context.Context, modID string, updateMo
173173
return nil, errors.New("this mod already has set a mod reference")
174174
}
175175

176-
dbUpdate := dbMod.Update().ClearTags().AddTagIDs(updateMod.TagIDs...)
176+
dbUpdate := dbMod.Update()
177+
if updateMod.TagIDs != nil {
178+
dbUpdate.ClearTags().AddTagIDs(updateMod.TagIDs...)
179+
}
177180

178181
SetINNOEF(updateMod.Name, dbUpdate.SetName)
179182
SetINNOEF(updateMod.ShortDescription, dbUpdate.SetShortDescription)

0 commit comments

Comments
 (0)