Disallow setting note source to another note (presumably that's what See Also is for)
This commit is contained in:
parent
cef196529c
commit
e22bdaab33
1 changed files with 4 additions and 0 deletions
|
@ -1231,6 +1231,10 @@ Scholar.Notes = new function(){
|
|||
Scholar.DB.commitTransaction();
|
||||
throw ("Cannot set note source to invalid item " + sourceItemID);
|
||||
}
|
||||
if (sourceItem.isNote()){
|
||||
Scholar.DB.commitTransaction();
|
||||
throw ("Cannot set note source to another note (" + sourceItemID + ")");
|
||||
}
|
||||
}
|
||||
|
||||
var note = Scholar.Items.getNewItemByType(Scholar.ItemTypes.getID('note'));
|
||||
|
|
Loading…
Add table
Reference in a new issue