fix: Missing quotation marks in SQL query

This commit is contained in:
Hussain Nagaria 2021-03-31 12:26:37 +05:30
parent f5576d67dd
commit 92c768972f

View File

@ -91,10 +91,10 @@ class EmployeeHoursReport:
additional_filters = ''
if self.filters.employee:
additional_filters += f'AND tt.employee = {self.filters.employee}'
additional_filters += f"AND tt.employee = '{self.filters.employee}'"
if self.filters.project:
additional_filters += f'AND ttd.project = {self.filters.project}'
additional_filters += f"AND ttd.project = '{self.filters.project}'"
self.filtered_time_logs = frappe.db.sql('''
SELECT tt.employee AS employee, ttd.hours AS hours, ttd.billable AS billable, ttd.project AS project