Creating a new item by calling item_template() method and mutating it means that future calls to item_template() return a template which retains these mutations.
Most probable cause: the returned value is a reference to the cached value, rather than a copy.
Demonstration code:
a=zot.item_template("conferencePaper")
print a
a["title"]="aaaaaaaaaaaaaa"
b=zot.item_template("conferencePaper")
print b
Creating a new item by calling item_template() method and mutating it means that future calls to item_template() return a template which retains these mutations.
Most probable cause: the returned value is a reference to the cached value, rather than a copy.
Demonstration code:
a=zot.item_template("conferencePaper") print a a["title"]="aaaaaaaaaaaaaa" b=zot.item_template("conferencePaper") print b
Output:
{u'DOI': u'', u'ISBN': u'', u'itemType': u'conferencePaper', u'extra': u'', u'series': u'', u'conferenceName': u'', u'abstractNote': u'', u'archive': u'', u'attachments': [], u'title': u'', u'proceedingsTitle': u'', u'archiveLocation': u'', u'tags': [], u'accessDate': u'', u'libraryCatalog': u'', u'volume': u'', u'callNumber': u'', u'date': u'', u'pages': u'', u'publisher': u'', u'shortTitle': u'', u'language': u'', u'rights': u'', u'url': u'', u'notes': [], u'place': u'', u'creators': [{u'lastName': u'', u'creatorType': u'author', u'firstName': u''}]}
{u'DOI': u'', u'ISBN': u'', u'itemType': u'conferencePaper', u'extra': u'', u'series': u'', u'conferenceName': u'', u'abstractNote': u'', u'archive': u'', u'attachments': [], u'title': 'aaaaaaaaaaaaaa', u'proceedingsTitle': u'', u'archiveLocation': u'', u'tags': [], u'accessDate': u'', u'libraryCatalog': u'', u'volume': u'', u'callNumber': u'', u'date': u'', u'pages': u'', u'publisher': u'', u'shortTitle': u'', u'language': u'', u'rights': u'', u'url': u'', u'notes': [], u'place': u'', u'creators': [{u'lastName': u'', u'creatorType': u'author', u'firstName': u''}]}