Safe check for dict
This commit is contained in:
parent
ab8b4304ae
commit
84aa6d370d
1 changed files with 2 additions and 1 deletions
|
|
@ -9,7 +9,8 @@ import re
|
|||
|
||||
def format_value(value, df, doc=None, currency=None):
|
||||
# Convert dict to object if necessary
|
||||
df = frappe._dict(df)
|
||||
if (isinstance(df, dict)):
|
||||
df = frappe._dict(df)
|
||||
|
||||
if df.get("fieldtype")=="Date":
|
||||
return formatdate(value)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue