Fixed performer creation / update

This commit is contained in:
Stash Dev 2019-02-11 03:06:33 -08:00
parent 77ffb65681
commit 4d3b00a4a8
1 changed files with 4 additions and 0 deletions

View File

@ -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