mirror of
https://github.com/frappe/erpnext.git
synced 2026-03-15 08:17:15 +00:00
[fix] if terms exists then only call render_template
This commit is contained in:
@@ -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)
|
||||
Reference in New Issue
Block a user