Safe check for dict

This commit is contained in:
nathando 2014-10-21 14:15:03 +08:00
parent ab8b4304ae
commit 84aa6d370d

View file

@ -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)