mirror of
https://github.com/stashapp/stash.git
synced 2026-04-20 05:52:40 +02:00
Fix to allow scene to be removed when attached to a movie (#421)
This commit is contained in:
parent
2a8e5d5b9b
commit
0bbb2bd1d0
1 changed files with 4 additions and 0 deletions
|
|
@ -138,6 +138,10 @@ func (qb *SceneQueryBuilder) ResetOCounter(id int, tx *sqlx.Tx) (int, error) {
|
|||
}
|
||||
|
||||
func (qb *SceneQueryBuilder) Destroy(id string, tx *sqlx.Tx) error {
|
||||
_, err := tx.Exec("DELETE FROM movies_scenes WHERE scene_id = ?", id)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return executeDeleteQuery("scenes", id, tx)
|
||||
}
|
||||
func (qb *SceneQueryBuilder) Find(id int) (*Scene, error) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue