mirror of
https://github.com/stashapp/stash.git
synced 2025-12-18 04:44:37 +03:00
[Files Refactor] Set primary flag when cleaning (#2880)
* Ensure single primary per object * Set primary file during clean * Only show migration notes for actual migrations
This commit is contained in:
@@ -193,6 +193,12 @@ func (qb *ImageStore) UpdatePartial(ctx context.Context, id int, partial models.
|
||||
}
|
||||
}
|
||||
|
||||
if partial.PrimaryFileID != nil {
|
||||
if err := imagesFilesTableMgr.setPrimary(ctx, id, *partial.PrimaryFileID); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
|
||||
return qb.find(ctx, id)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user