From 297336f955c1b4835b0d13f124491cc9c303c8f7 Mon Sep 17 00:00:00 2001 From: Gabriel Augendre Date: Wed, 25 May 2022 19:18:02 +0200 Subject: [PATCH] Fix ordering if no publish date --- src/articles/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/articles/models.py b/src/articles/models.py index 015eb51..056f0ca 100644 --- a/src/articles/models.py +++ b/src/articles/models.py @@ -76,7 +76,7 @@ class Article(models.Model): tags = models.ManyToManyField(to=Tag, related_name="articles", blank=True) class Meta: - ordering = ["-published_at"] + ordering = ["-published_at", "-updated_at"] def __str__(self) -> str: return self.title