mirror of
https://github.com/photoprism/photoprism.git
synced 2025-12-11 16:24:11 +01:00
Batch: Perform priority comparison after resolving the PhotoLabel #271
Signed-off-by: Michael Mayer <michael@photoprism.app>
This commit is contained in:
@@ -110,8 +110,10 @@ func ApplyLabels(photo *entity.Photo, labels Items) (errs []error) {
|
|||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
labelIndex[labelEntity.ID] = pl
|
labelIndex[labelEntity.ID] = pl
|
||||||
} else if entity.SrcPriority[pl.LabelSrc] > entity.SrcPriority[entity.SrcBatch] {
|
}
|
||||||
// Keep existing label with higher priority.
|
|
||||||
|
// Keep existing label with higher priority than batch updates, even if it wasn't preloaded.
|
||||||
|
if entity.SrcPriority[pl.LabelSrc] > entity.SrcPriority[entity.SrcBatch] {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user