[fix] if terms exists then only call render_template
This commit is contained in:
parent
0dab40f4a1
commit
f65e8de5a5
@ -18,4 +18,6 @@ def get_terms_and_conditions(template_name, doc):
|
||||
doc = json.loads(doc)
|
||||
|
||||
terms_and_conditions = frappe.get_doc("Terms and Conditions", template_name)
|
||||
return frappe.render_template(terms_and_conditions.terms, doc)
|
||||
|
||||
if terms_and_conditions.terms:
|
||||
return frappe.render_template(terms_and_conditions.terms, doc)
|
Loading…
Reference in New Issue
Block a user