Merge pull request #19102 from ruchamahabal/attendance_template_fix

fix(HR): upload attendance template not marking attendance
This commit is contained in:
Mangesh-Khairnar 2019-09-19 14:20:05 +05:30 committed by GitHub
commit 231472bc20
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -60,8 +60,8 @@ def get_data(args):
existing_attendance = {}
if existing_attendance_records \
and tuple([getdate(date), employee.name]) in existing_attendance_records \
and getdate(employee.date_of_joining) >= getdate(date) \
and getdate(employee.relieving_date) <= getdate(date):
and getdate(employee.date_of_joining) <= getdate(date) \
and getdate(employee.relieving_date) >= getdate(date):
existing_attendance = existing_attendance_records[tuple([getdate(date), employee.name])]
row = [
existing_attendance and existing_attendance.name or "",