Skip to content

Commit

Permalink
Fix to allow scene to be removed when attached to a movie (stashapp#421)
Browse files Browse the repository at this point in the history
  • Loading branch information
Anon247 authored Apr 1, 2020
1 parent e9d9fa2 commit 8ac369d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/models/querybuilder_scene.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 8ac369d

Please sign in to comment.