From 5bc9aa4efc2aa36659a24495c12cb95de20649a4 Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Wed, 5 Jun 2013 14:58:17 +0530 Subject: [PATCH] [wnf] [reset perms] fix --- wnf.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/wnf.py b/wnf.py index 222bc7e378..0377f5eae1 100755 --- a/wnf.py +++ b/wnf.py @@ -503,8 +503,11 @@ def run(): elif options.reset_perms: for d in webnotes.conn.sql_list("""select name from `tabDocType` where ifnull(istable, 0)=0 and ifnull(custom, 0)=0"""): - webnotes.reset_perms(d) - webnotes.clear_cache(doctype=d) + try: + webnotes.clear_cache(doctype=d) + webnotes.reset_perms(d) + except: + pass if __name__=='__main__':