journal/models: use reversed on queryset

This commit is contained in:
Christophe Siraut 2020-08-28 16:13:37 +02:00
parent 2f3c6bd82b
commit 2568b29dad
1 changed files with 1 additions and 1 deletions

View File

@ -4,7 +4,7 @@ from django.contrib.postgres.fields import JSONField
class EntryManager(models.Manager):
def print(self, lines=100):
return self.model.objects.order_by('-timestamp')[:int(lines)].reverse()
return reversed(self.model.objects.order_by('-timestamp')[:int(lines)])
class Entry(models.Model):