Check for NS_ERROR_STORAGE_CONSTRAINT in tag constraint error
This commit is contained in:
parent
89833d94b3
commit
95bf52baf5
1 changed files with 3 additions and 1 deletions
|
@ -359,7 +359,9 @@ Zotero.Tag.prototype.save = function (full) {
|
||||||
catch (e) {
|
catch (e) {
|
||||||
// If an incoming tag is the same as an existing tag, but with a different key,
|
// If an incoming tag is the same as an existing tag, but with a different key,
|
||||||
// then delete the old tag and add its linked items to the new tag
|
// then delete the old tag and add its linked items to the new tag
|
||||||
if (typeof e == 'string' && e.indexOf('columns libraryID, name, type are not unique') != -1) {
|
if (typeof e == 'string' &&
|
||||||
|
(e.indexOf('columns libraryID, name, type are not unique') != -1
|
||||||
|
|| e.indexOf('NS_ERROR_STORAGE_CONSTRAINT') != -1)) {
|
||||||
Zotero.debug("Tag matches existing tag with different key -- delete old tag and merging items");
|
Zotero.debug("Tag matches existing tag with different key -- delete old tag and merging items");
|
||||||
|
|
||||||
// GET existing tag
|
// GET existing tag
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue