mirror of
https://github.com/stashapp/stash.git
synced 2026-05-09 05:05:29 +02:00
Fixed performer creation / update
This commit is contained in:
parent
77ffb65681
commit
4d3b00a4a8
1 changed files with 4 additions and 0 deletions
|
|
@ -72,6 +72,8 @@ func (r *mutationResolver) PerformerCreate(ctx context.Context, input models.Per
|
||||||
}
|
}
|
||||||
if input.Favorite != nil {
|
if input.Favorite != nil {
|
||||||
newPerformer.Favorite = sql.NullBool{ Bool: *input.Favorite, Valid: true }
|
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
|
// 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 {
|
if input.Favorite != nil {
|
||||||
updatedPerformer.Favorite = sql.NullBool{ Bool: *input.Favorite, Valid: true }
|
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
|
// Start the transaction and save the performer
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue