mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-02 19:59:12 +00:00
Merge pull request #7406 from saurabh6790/terms_and_cond_fix
[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)
|
doc = json.loads(doc)
|
||||||
|
|
||||||
terms_and_conditions = frappe.get_doc("Terms and Conditions", template_name)
|
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