Skip to content

Commit d44fe04

Browse files
committed
Fixed date bug
1 parent d7054d3 commit d44fe04

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

enter/views.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
def library(request):
1818
# Get the current date and yesterday's date
1919
today = date.today()
20-
yesterday = datetime.now().date() - timedelta(days=1)
20+
yesterday = datetime.now().date() - timedelta(days=2)
2121

2222
# Update entries with status 'IN' and date before or equal to yesterday
2323
record.objects.filter(status='IN', date__lte=yesterday, exittime__isnull=True).update(exittime='23:30:00', status='OUT')

0 commit comments

Comments
 (0)