fixed null issue in update_cp
This commit is contained in:
parent
269115f191
commit
a06c2ceaff
@ -29,7 +29,7 @@ class DocType:
|
||||
set_default(defkey, defvalue)
|
||||
|
||||
if defkey == 'fiscal_year':
|
||||
ysd = sql("select year_start_date from `tabFiscal Year` where name=%s", defvalue)
|
||||
ysd = sql("select year_start_date from `tabFiscal Year` where name=%s", cstr(defvalue))
|
||||
ysd = ysd and ysd[0][0] or ''
|
||||
if ysd:
|
||||
set_default('year_start_date', ysd.strftime('%Y-%m-%d'))
|
||||
|
Loading…
Reference in New Issue
Block a user