Skip to content

Commit

Permalink
Update FieldStrategyOverwrite to work when scene has no existing URL (s…
Browse files Browse the repository at this point in the history
  • Loading branch information
bayured authored and halkeye committed Sep 1, 2024
1 parent 852dd59 commit 3953107
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/identify/identify.go
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ func getScenePartial(scene *models.Scene, scraped *scraper.ScrapedScene, fieldOp
switch getFieldStrategy(fieldOptions["url"]) {
case FieldStrategyOverwrite:
// 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{
Values: scraped.URLs,
Mode: models.RelationshipUpdateModeSet,
Expand Down

0 comments on commit 3953107

Please sign in to comment.