diff --git a/frappe/patches/v7_0/cleanup_list_settings.py b/frappe/patches/v7_0/cleanup_list_settings.py index ef12def852..711b908c34 100644 --- a/frappe/patches/v7_0/cleanup_list_settings.py +++ b/frappe/patches/v7_0/cleanup_list_settings.py @@ -7,6 +7,8 @@ def execute(): for ls in list_settings: if ls and ls.data: data = json.loads(ls.data) + if not data.has_key("fields"): + continue fields = data["fields"] for field in fields: if "name as" in field: @@ -15,4 +17,4 @@ def execute(): frappe.db.sql("update __ListSettings set data = %s where user=%s and doctype=%s", (json.dumps(data), ls.user, ls.doctype)) - \ No newline at end of file +