From 4659b1eb25bcd9fb2f1ff6cb43555691dd8e80fd Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Thu, 12 Jul 2012 23:38:31 +0530 Subject: [PATCH] log error on saving doclist in cms2 patch --- erpnext/patches/june_2012/cms2.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/erpnext/patches/june_2012/cms2.py b/erpnext/patches/june_2012/cms2.py index 03a60ed6ea4..1c895f07d8f 100644 --- a/erpnext/patches/june_2012/cms2.py +++ b/erpnext/patches/june_2012/cms2.py @@ -66,10 +66,14 @@ def save_pages(): import webnotes from webnotes.model.doclist import DocList + import webnotes.modules.patch_handler for dt in query_map: for result in webnotes.conn.sql(query_map[dt], as_dict=1): - DocList(dt, result['name']).save() + try: + DocList(dt, result['name']).save() + except Exception, e: + webnotes.modules.patch_handler.log(str(e)) def save_website_settings(): from webnotes.model.code import get_obj