[minor] bypass plugin field related operational error
This commit is contained in:
parent
92b62b2fc9
commit
e83bfdb333
1 changed files with 2 additions and 2 deletions
|
|
@ -18,7 +18,7 @@ class DocType:
|
|||
webnotes.clear_cache(doctype=self.doc.dt)
|
||||
|
||||
def get_custom_server_script(doctype, plugin=None):
|
||||
import os
|
||||
import os, MySQLdb
|
||||
custom_script = webnotes.cache().get_value("_server_script:" + doctype)
|
||||
|
||||
if not custom_script:
|
||||
|
|
@ -30,7 +30,7 @@ def get_custom_server_script(doctype, plugin=None):
|
|||
else:
|
||||
custom_script = "Does Not Exist"
|
||||
webnotes.cache().set_value("_server_script:" + doctype, custom_script)
|
||||
except webnotes.DoesNotExistError:
|
||||
except (webnotes.DoesNotExistError, MySQLdb.OperationalError):
|
||||
# this happens when syncing
|
||||
return None
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue