webnotes/wnframework — pull request #296 by MaxMorais (2013-11-18 14:24:56+00:00)
Title: Fix KeyError

Traceback (innermost last):
File "lib/webnotes/handler.py", line 78, in handle
execute_cmd(cmd)
File "lib/webnotes/handler.py", line 118, in execute_cmd
ret = call(method, webnotes.form_dict)
File "lib/webnotes/handler.py", line 140, in call
return fn(**newargs)
File "app/selling/doctype/sales_order/sales_order.py", line 447, in get_project_costs
data = project.toDict() # Get the item and subitems to compose the sales bom
File "./ParsePromob.py", line 348, in toDict
'items': list(self.getAmbients())
File "./ParsePromob.py", line 324, in getAmbients
ambient.getOrCreate()
File "./ParsePromob.py", line 252, in getOrCreate
self.ensureBOM()
File "./ParsePromob.py", line 267, in ensureBOM
bom.doclist.update(bom_items)
File "lib/webnotes/model/doclist.py", line 121, in update
if not d["name"]:
KeyError: 'name'