From d9b4b121b8be97712d9133cba164803e6fa7ba11 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Mon, 12 Feb 2007 07:08:47 +0000 Subject: [PATCH] Don't allow Zotero.Notes.add() to set sourceItemID to an attachment --- chrome/content/zotero/xpcom/data_access.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/chrome/content/zotero/xpcom/data_access.js b/chrome/content/zotero/xpcom/data_access.js index a515614dd2..cf42a1c153 100644 --- a/chrome/content/zotero/xpcom/data_access.js +++ b/chrome/content/zotero/xpcom/data_access.js @@ -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 + ")"); } }