Fix ordering if no publish date

This commit is contained in:
Gabriel Augendre 2022-05-25 19:18:02 +02:00
parent a0158944b4
commit 297336f955

View file

@ -76,7 +76,7 @@ class Article(models.Model):
tags = models.ManyToManyField(to=Tag, related_name="articles", blank=True) tags = models.ManyToManyField(to=Tag, related_name="articles", blank=True)
class Meta: class Meta:
ordering = ["-published_at"] ordering = ["-published_at", "-updated_at"]
def __str__(self) -> str: def __str__(self) -> str:
return self.title return self.title