mirror of
https://github.com/jazzband/django-auditlog.git
synced 2026-03-16 22:20:26 +00:00
Change auditlogflush management command before_date query filter to apply the filter only on date part of timestamp (#384)
This commit is contained in:
parent
128555fa29
commit
2e9466d1b4
1 changed files with 1 additions and 1 deletions
|
|
@ -45,7 +45,7 @@ class Command(BaseCommand):
|
|||
if answer:
|
||||
entries = LogEntry.objects.all()
|
||||
if before is not None:
|
||||
entries = entries.filter(timestamp__lt=before)
|
||||
entries = entries.filter(timestamp__date__lt=before)
|
||||
count, _ = entries.delete()
|
||||
self.stdout.write("Deleted %d objects." % count)
|
||||
else:
|
||||
|
|
|
|||
Loading…
Reference in a new issue