mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-25 16:04:46 +00:00
fixed null issue in update_cp
This commit is contained in:
@@ -29,7 +29,7 @@ class DocType:
|
|||||||
set_default(defkey, defvalue)
|
set_default(defkey, defvalue)
|
||||||
|
|
||||||
if defkey == 'fiscal_year':
|
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 ''
|
ysd = ysd and ysd[0][0] or ''
|
||||||
if ysd:
|
if ysd:
|
||||||
set_default('year_start_date', ysd.strftime('%Y-%m-%d'))
|
set_default('year_start_date', ysd.strftime('%Y-%m-%d'))
|
||||||
|
|||||||
Reference in New Issue
Block a user