Fix ordering if no publish date
This commit is contained in:
parent
a0158944b4
commit
297336f955
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||||
|
|
Reference in a new issue