Include item type name in field-not-valid-for-type error
This commit is contained in:
parent
7940915bb0
commit
f400d2a4a4
1 changed files with 2 additions and 1 deletions
|
@ -766,7 +766,8 @@ Zotero.Item.prototype.setField = function(field, value, loadIn) {
|
|||
fieldID = Zotero.ItemFields.getFieldIDFromTypeAndBase(itemTypeID, fieldID) || fieldID;
|
||||
|
||||
if (value !== false && !Zotero.ItemFields.isValidForType(fieldID, itemTypeID)) {
|
||||
var msg = "'" + field + "' is not a valid field for type " + itemTypeID;
|
||||
let msg = "'" + field + "' is not a valid field for type '"
|
||||
+ Zotero.ItemFields.getName(itemTypeID) + "'";
|
||||
|
||||
if (loadIn) {
|
||||
Zotero.debug(msg + " -- ignoring value '" + value + "'", 2);
|
||||
|
|
Loading…
Add table
Reference in a new issue