[minor] fixed patch
This commit is contained in:
parent
447068aefe
commit
526a60b517
@ -6,6 +6,7 @@ def execute():
|
|||||||
|
|
||||||
for question in webnotes.conn.sql("""select * from tabQuestion""", as_dict=True):
|
for question in webnotes.conn.sql("""select * from tabQuestion""", as_dict=True):
|
||||||
if question.question:
|
if question.question:
|
||||||
|
try:
|
||||||
name = question.question[:180]
|
name = question.question[:180]
|
||||||
if webnotes.conn.exists("Note", name):
|
if webnotes.conn.exists("Note", name):
|
||||||
webnotes.delete_doc("Note", name)
|
webnotes.delete_doc("Note", name)
|
||||||
@ -18,6 +19,8 @@ def execute():
|
|||||||
"creation": question.creation,
|
"creation": question.creation,
|
||||||
"public": 1
|
"public": 1
|
||||||
}).insert()
|
}).insert()
|
||||||
|
except NameError:
|
||||||
|
pass
|
||||||
|
|
||||||
webnotes.delete_doc("DocType", "Question")
|
webnotes.delete_doc("DocType", "Question")
|
||||||
webnotes.delete_doc("DocType", "Answer")
|
webnotes.delete_doc("DocType", "Answer")
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user