mirror of
https://github.com/stashapp/stash.git
synced 2025-12-06 08:26:00 +01:00
Update FieldStrategyOverwrite to work when scene has no existing URL (#4412)
This commit is contained in:
parent
743ab9a52c
commit
f5e3fe77b7
1 changed files with 1 additions and 1 deletions
|
|
@ -392,7 +392,7 @@ func getScenePartial(scene *models.Scene, scraped *scraper.ScrapedScene, fieldOp
|
||||||
switch getFieldStrategy(fieldOptions["url"]) {
|
switch getFieldStrategy(fieldOptions["url"]) {
|
||||||
case FieldStrategyOverwrite:
|
case FieldStrategyOverwrite:
|
||||||
// only overwrite if not equal
|
// only overwrite if not equal
|
||||||
if len(sliceutil.Exclude(scene.URLs.List(), scraped.URLs)) != 0 {
|
if len(sliceutil.Exclude(scraped.URLs, scene.URLs.List())) != 0 {
|
||||||
partial.URLs = &models.UpdateStrings{
|
partial.URLs = &models.UpdateStrings{
|
||||||
Values: scraped.URLs,
|
Values: scraped.URLs,
|
||||||
Mode: models.RelationshipUpdateModeSet,
|
Mode: models.RelationshipUpdateModeSet,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue