fix: Fix timestamp filtering inconsistency
Corrects the timestamp comparison in the status filtering logic by using the adjusted datetime object for accurate filtering, ensuring list results reflect intended timestamp boundaries.
This commit is contained in:
parent
a377722339
commit
d98aa34e14
1 changed files with 1 additions and 1 deletions
|
@ -56,7 +56,7 @@ class StatusListView(LoginRequiredMixin, ListView):
|
||||||
if "to" in self.request.GET:
|
if "to" in self.request.GET:
|
||||||
to_timestamp = datetime.strptime(self.request.GET["to"], "%Y-%m-%d")
|
to_timestamp = datetime.strptime(self.request.GET["to"], "%Y-%m-%d")
|
||||||
to_timestamp = to_timestamp.replace(hour=23, minute=59, second=59)
|
to_timestamp = to_timestamp.replace(hour=23, minute=59, second=59)
|
||||||
status_list = status_list.filter(timestamp__lte=self.request.GET["to"])
|
status_list = status_list.filter(timestamp__lte=to_timestamp)
|
||||||
|
|
||||||
return status_list
|
return status_list
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue