fix: Move .format out of translation method

This commit is contained in:
Faris Ansari 2020-01-30 12:31:04 +05:30 committed by GitHub
parent 47de77b2b1
commit 41b0cf87e5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -53,8 +53,8 @@ class AutoEmailReport(Document):
""" check if user has select correct report format """
valid_report_formats = ["HTML", "XLSX", "CSV"]
if self.format not in valid_report_formats:
frappe.throw(_("{0} is not a valid report format. Report format should one of the following {1}" \
.format(frappe.bold(self.format), frappe.bold(", ".join(valid_report_formats)))))
frappe.throw(_("{0} is not a valid report format. Report format should one of the following {1}")
.format(frappe.bold(self.format), frappe.bold(", ".join(valid_report_formats))))
def get_report_content(self):
'''Returns file in for the report in given format'''