- Fix "ItemID not set for object before attempting to load data" conflict resolution error
- Probably fix "getFileName() can only be called on attachment items in Zotero.Item.getFilename()" conflict resolution error
This commit is contained in:
parent
ad2122a0cd
commit
ee57f38e49
2 changed files with 3 additions and 2 deletions
|
@ -92,7 +92,7 @@
|
||||||
// TODO: Make sure object is the correct type
|
// TODO: Make sure object is the correct type
|
||||||
|
|
||||||
// Check for note or attachment if not already set
|
// Check for note or attachment if not already set
|
||||||
if (this._leftpane.ref == 'deleted' && this.type == 'item') {
|
if (this._leftpane.ref == 'deleted' && val instanceof Zotero.Item) {
|
||||||
this.type = this._getTypeFromItem(val);
|
this.type = this._getTypeFromItem(val);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3667,6 +3667,7 @@ Zotero.Item.prototype.clone = function(includePrimary, newItem, unsaved) {
|
||||||
|
|
||||||
Zotero.DB.beginTransaction();
|
Zotero.DB.beginTransaction();
|
||||||
|
|
||||||
|
// TODO: get rid of serialize() call
|
||||||
var obj = this.serialize();
|
var obj = this.serialize();
|
||||||
|
|
||||||
var itemTypeID = this.itemTypeID;
|
var itemTypeID = this.itemTypeID;
|
||||||
|
@ -4146,7 +4147,7 @@ Zotero.Item.prototype.serialize = function(mode) {
|
||||||
if (!this._primaryDataLoaded) {
|
if (!this._primaryDataLoaded) {
|
||||||
this.loadPrimaryData(true);
|
this.loadPrimaryData(true);
|
||||||
}
|
}
|
||||||
if (!this._itemDataLoaded) {
|
if (!this._itemDataLoaded && this.id) {
|
||||||
this._loadItemData();
|
this._loadItemData();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue