diff --git a/api/resolver_mutation_performer.go b/api/resolver_mutation_performer.go index cf29c416f..8962051f8 100644 --- a/api/resolver_mutation_performer.go +++ b/api/resolver_mutation_performer.go @@ -72,6 +72,8 @@ func (r *mutationResolver) PerformerCreate(ctx context.Context, input models.Per } if input.Favorite != nil { newPerformer.Favorite = sql.NullBool{ Bool: *input.Favorite, Valid: true } + } else { + newPerformer.Favorite = sql.NullBool{ Bool: false, Valid: true } } // Start the transaction and save the performer @@ -153,6 +155,8 @@ func (r *mutationResolver) PerformerUpdate(ctx context.Context, input models.Per } if input.Favorite != nil { updatedPerformer.Favorite = sql.NullBool{ Bool: *input.Favorite, Valid: true } + } else { + updatedPerformer.Favorite = sql.NullBool{ Bool: false, Valid: true } } // Start the transaction and save the performer