Skip to content

Commit

Permalink
fix: set date filters correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
asmitahase committed Feb 4, 2025
1 parent 7483e09 commit e2850a1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions hrms/hr/doctype/attendance/attendance.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,9 +235,9 @@ def get_events(start, end, filters=None):
import json

filters = json.loads(filters)
if filters:
filters.append(["attendance_date", "between", [get_datetime(start).date(), get_datetime(end).date()]])

if not filters:
filters = []
filters.append(["attendance_date", "between", [get_datetime(start).date(), get_datetime(end).date()]])
attendance_records = add_attendance(filters)
add_holidays(attendance_records, start, end, employee)
return attendance_records
Expand Down

0 comments on commit e2850a1

Please sign in to comment.