mirror of
https://github.com/stashapp/stash.git
synced 2025-12-17 04:14:39 +03:00
Fixed performer creation / update
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user