From 9d5bb4c88400d5ec937540f5c9ddf47cbf157593 Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Fri, 1 Jul 2011 15:16:25 +0530 Subject: [PATCH] fix in import --- .gitignore | 1 + cgi-bin/webnotes/model/doctype.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 117b892b34..1c6dbb5761 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ *.pyc *.comp.js *.DS_Store +defs.py diff --git a/cgi-bin/webnotes/model/doctype.py b/cgi-bin/webnotes/model/doctype.py index 39a6137496..c73474799c 100644 --- a/cgi-bin/webnotes/model/doctype.py +++ b/cgi-bin/webnotes/model/doctype.py @@ -140,7 +140,7 @@ class _DocType: fields = {} for d in doclist: if d['doctype']=='DocField': - if d['fieldname'] or d['label']: + if d.get('fieldname') or d.get('label'): fields[d['fieldname'] or d['label']] = d return fields