[data import][validation] removed validation for no options for select fields

This commit is contained in:
Nabin Hait 2013-04-02 14:55:50 +05:30
parent 1377b2f6d1
commit 5459eca72e
2 changed files with 13 additions and 4 deletions

View file

@ -267,10 +267,8 @@ def check_record(d, parenttype=None):
if docfield.reqd and (val=='' or val==None):
raise Exception, "%s is mandatory." % key
if docfield.fieldtype=='Select' and val:
if not docfield.options:
raise Exception, "Select options are missing for %s"
elif docfield.options.startswith('link:'):
if docfield.fieldtype=='Select' and val and docfield.options:
if docfield.options.startswith('link:'):
link_doctype = docfield.options.split(':')[1]
if not webnotes.conn.exists(link_doctype, val):
raise Exception, "%s must be a valid %s" % (key, link_doctype)

View file

@ -2244,5 +2244,16 @@
"currency_fraction_units": 100,
"currency_symbol": "P",
"number_format": "#,###.##"
},
"Aruba": {
"currency_fraction": "Cent",
"timezones": [
"America/Aruba"
],
"currency_name": "Aruban Florin",
"currency": "AWG",
"currency_fraction_units": 100,
"currency_symbol": "Afl",
"number_format": "#,###.##"
}
}