Fix bulk add movie to scenes and autotag transaction error (#2928)

* Fix bulk add movie to scene
* Fix already in transaction error for autotag
This commit is contained in:
WithoutPants
2022-09-19 14:52:40 +10:00
committed by GitHub
parent 648247aa00
commit 0359ce2ed8
5 changed files with 37 additions and 5 deletions

View File

@@ -791,6 +791,29 @@ func Test_sceneQueryBuilder_UpdatePartialRelationships(t *testing.T) {
},
false,
},
{
"add movies to empty",
sceneIDs[sceneIdx1WithPerformer],
models.ScenePartial{
MovieIDs: &models.UpdateMovieIDs{
Movies: movieScenes,
Mode: models.RelationshipUpdateModeAdd,
},
},
models.Scene{
Movies: models.NewRelatedMovies([]models.MoviesScenes{
{
MovieID: movieIDs[movieIdxWithDupName],
SceneIndex: &sceneIndex,
},
{
MovieID: movieIDs[movieIdxWithStudio],
SceneIndex: &sceneIndex2,
},
}),
},
false,
},
{
"add stash ids",
sceneIDs[sceneIdxWithSpacedName],