diff --git a/models.py b/models.py index 8d9c978..618a7af 100644 --- a/models.py +++ b/models.py @@ -31,10 +31,7 @@ class ScanLog(BaseModel): today_end = datetime.combine(today, time.max) # End of day (23:59:59.999999) # Query logs for today - return cls.objects.filter( - scan_at__gte=today_start, - scan_at__lte=today_end - ).order_by('-scan_at') + return cls.select().where(cls.scan_at.between(today_start, today_end)) def serialize(self): # Try to get product info from BarcodeDB