diff --git a/internal/api/resolver_mutation_performer.go b/internal/api/resolver_mutation_performer.go index 2c23f063a2b..dbdfe2160fc 100644 --- a/internal/api/resolver_mutation_performer.go +++ b/internal/api/resolver_mutation_performer.go @@ -201,8 +201,12 @@ func (r *mutationResolver) PerformerUpdate(ctx context.Context, input PerformerU Mode: models.RelationshipUpdateModeSet, } } else if translator.hasField("aliases") { + var values []string + if input.Aliases != nil { + values = stringslice.FromString(*input.Aliases, ",") + } updatedPerformer.Aliases = &models.UpdateStrings{ - Values: stringslice.FromString(*input.Aliases, ","), + Values: values, Mode: models.RelationshipUpdateModeSet, } } @@ -332,8 +336,12 @@ func (r *mutationResolver) BulkPerformerUpdate(ctx context.Context, input BulkPe Mode: input.AliasList.Mode, } } else if translator.hasField("aliases") { + var values []string + if input.Aliases != nil { + values = stringslice.FromString(*input.Aliases, ",") + } updatedPerformer.Aliases = &models.UpdateStrings{ - Values: stringslice.FromString(*input.Aliases, ","), + Values: values, Mode: models.RelationshipUpdateModeSet, } } diff --git a/internal/api/resolver_mutation_scene.go b/internal/api/resolver_mutation_scene.go index 12d89c9d8fc..4c338586c5e 100644 --- a/internal/api/resolver_mutation_scene.go +++ b/internal/api/resolver_mutation_scene.go @@ -200,8 +200,12 @@ func scenePartialFromInput(input models.SceneUpdateInput, translator changesetTr Mode: models.RelationshipUpdateModeSet, } } else if translator.hasField("url") { + var values []string + if input.URL != nil { + values = []string{*input.URL} + } updatedScene.URLs = &models.UpdateStrings{ - Values: []string{*input.URL}, + Values: values, Mode: models.RelationshipUpdateModeSet, } } @@ -381,8 +385,12 @@ func (r *mutationResolver) BulkSceneUpdate(ctx context.Context, input BulkSceneU Mode: input.Urls.Mode, } } else if translator.hasField("url") { + var values []string + if input.URL != nil { + values = []string{*input.URL} + } updatedScene.URLs = &models.UpdateStrings{ - Values: []string{*input.URL}, + Values: values, Mode: models.RelationshipUpdateModeSet, } }