From 7980b9d3ade75697aa149a9bf48efd766cc2f1a0 Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Mon, 28 May 2012 16:08:19 +0530 Subject: [PATCH] data-import-tool: ignore select validation if no incoming value --- py/core/page/data_import_tool/data_import_tool.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/py/core/page/data_import_tool/data_import_tool.py b/py/core/page/data_import_tool/data_import_tool.py index ed46929382..862e659caf 100644 --- a/py/core/page/data_import_tool/data_import_tool.py +++ b/py/core/page/data_import_tool/data_import_tool.py @@ -195,7 +195,7 @@ def check_record(d, parentdoctype): if not webnotes.conn.exists(link_doctype, val): raise Exception, "%s must be a valid %s" % (key, link_doctype) else: - if val not in docfield.options.split('\n'): + if val and (val not in docfield.options.split('\n')): raise Exception, "%s must be one of:" % key if docfield.fieldtype=='Date' and val: