From e59f456ad49cbfe8c0636efbde3626723d328b52 Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Tue, 7 Feb 2012 14:50:50 +0530 Subject: [PATCH] If support ticket doesnt have body, then do not append in reply to string --- erpnext/support/doctype/support_ticket/support_ticket.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/erpnext/support/doctype/support_ticket/support_ticket.py b/erpnext/support/doctype/support_ticket/support_ticket.py index 383e0b2d3f..7031cccdb1 100644 --- a/erpnext/support/doctype/support_ticket/support_ticket.py +++ b/erpnext/support/doctype/support_ticket/support_ticket.py @@ -56,7 +56,11 @@ class DocType(TransactionBase): response_title = "=== In response to ===" - return "\n\n" + response_title + "\n\n" + tmp[0][0].split(response_title)[0] + if tmp and tmp[0][0]: + return "\n\n" + response_title + "\n\n" + tmp[0][0].split(response_title)[0] + else: + return "" + def make_response_record(self, response, from_email = None, content_type='text/plain'): """