From 4a7c0aff78ccbee5db2fadba1de1a3c74c3f85d9 Mon Sep 17 00:00:00 2001 From: Rob B Date: Fri, 18 Oct 2024 15:57:35 -0400 Subject: [PATCH] fix: attempt fix regression of b35adb7 (#98) --- gql/resolver_mods.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gql/resolver_mods.go b/gql/resolver_mods.go index d55cb68..074d6c7 100644 --- a/gql/resolver_mods.go +++ b/gql/resolver_mods.go @@ -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)