Merge pull request #541 from DakuTree/patch-constraints
Fix constraint violations when mass-editing an image that already contains the new tag
This commit is contained in:
commit
cfad6087ab
@ -367,6 +367,9 @@ class TagEdit extends Extension {
|
||||
$after[] = $tag;
|
||||
}
|
||||
|
||||
// replace'd tag may already exist in tag set, so remove dupes to avoid integrity constraint violations.
|
||||
$after = array_unique($after);
|
||||
|
||||
$image->set_tags($after);
|
||||
|
||||
$last_id = $image->id;
|
||||
|
Loading…
x
Reference in New Issue
Block a user