Merge pull request #7406 from saurabh6790/terms_and_cond_fix

[fix] if terms exists then only call render_template
This commit is contained in:
Nabin Hait 2017-01-09 15:49:56 +05:30 committed by GitHub
commit 1839fcca11

View File

@ -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)