mirror of
https://github.com/stashapp/stash.git
synced 2025-12-17 04:14:39 +03:00
SQLite model refactoring (#3791)
* Remove ID from PerformerPartial * Separate studio model from sqlite model * Separate movie model from sqlite model * Separate tag model from sqlite model * Separate saved filter model from sqlite model * Separate scene marker model from sqlite model * Separate gallery chapter model from sqlite model * Move ErrNoRows checks into sqlite, improve empty result error messages * Move SQLiteDate and SQLiteTimestamp to sqlite * Use changesetTranslator everywhere, refactor for consistency * Make PerformerStore.DestroyImage private * Fix rating on movie create
This commit is contained in:
@@ -954,7 +954,7 @@ func Test_imageQueryBuilder_Destroy(t *testing.T) {
|
||||
// ensure cannot be found
|
||||
i, err := qb.Find(ctx, tt.id)
|
||||
|
||||
assert.NotNil(err)
|
||||
assert.Nil(err)
|
||||
assert.Nil(i)
|
||||
})
|
||||
}
|
||||
@@ -962,9 +962,13 @@ func Test_imageQueryBuilder_Destroy(t *testing.T) {
|
||||
|
||||
func makeImageWithID(index int) *models.Image {
|
||||
const fromDB = true
|
||||
ret := makeImage(index, true)
|
||||
ret := makeImage(index)
|
||||
ret.ID = imageIDs[index]
|
||||
|
||||
if ret.Date != nil && ret.Date.IsZero() {
|
||||
ret.Date = nil
|
||||
}
|
||||
|
||||
ret.Files = models.NewRelatedFiles([]file.File{makeImageFile(index)})
|
||||
|
||||
return ret
|
||||
@@ -987,7 +991,7 @@ func Test_imageQueryBuilder_Find(t *testing.T) {
|
||||
"invalid",
|
||||
invalidID,
|
||||
nil,
|
||||
true,
|
||||
false,
|
||||
},
|
||||
{
|
||||
"with performers",
|
||||
|
||||
Reference in New Issue
Block a user