Commits

shantanoo committed 307485a

minor fix for temporary attendace records in case there is crash
and stale entries are not removed.

Comments (0)

Files changed (1)

 						else:
 							remark = 'E'
 				elif rem == 'H':
-					tattendance = TempAttendance.objects.filter(Barcode=barcode)[0]
+					tattendance = TempAttendance.objects.filter(Barcode=barcode)
+                    if tattendance:
+                        tattendance = tattendance[0]
 					if time < timerule.EarlyOut:
 						remark = 'A'
 						if tattendance: