Merge pull request #7406 from saurabh6790/terms_and_cond_fix

[fix] if terms exists then only call render_template
diff --git a/erpnext/setup/doctype/terms_and_conditions/terms_and_conditions.py b/erpnext/setup/doctype/terms_and_conditions/terms_and_conditions.py
index 37f114b..85cf4dd 100644
--- a/erpnext/setup/doctype/terms_and_conditions/terms_and_conditions.py
+++ b/erpnext/setup/doctype/terms_and_conditions/terms_and_conditions.py
@@ -18,4 +18,6 @@
 		doc = json.loads(doc)
 
 	terms_and_conditions = frappe.get_doc("Terms and Conditions", template_name)
-	return frappe.render_template(terms_and_conditions.terms, doc)
\ No newline at end of file
+	
+	if terms_and_conditions.terms:
+		return frappe.render_template(terms_and_conditions.terms, doc)
\ No newline at end of file