Don't allow Zotero.Notes.add() to set sourceItemID to an attachment

This commit is contained in:
Dan Stillman 2007-02-12 07:08:47 +00:00
parent 0a3913d792
commit d9b4b121b8

View File

@ -2573,9 +2573,9 @@ Zotero.Notes = new function(){
Zotero.DB.commitTransaction();
throw ("Cannot set note source to invalid item " + sourceItemID);
}
if (sourceItem.isNote()){
if (!sourceItem.isRegularItem()){
Zotero.DB.commitTransaction();
throw ("Cannot set note source to another note (" + sourceItemID + ")");
throw ("Cannot set note source to a note or attachment (" + sourceItemID + ")");
}
}