Skip to content
This repository was archived by the owner on Sep 3, 2020. It is now read-only.

Commit 7bc35c1

Browse files
Fixing system warning due to unordered queryset.
1 parent 8016cf9 commit 7bc35c1

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

qa/models.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ class Question(models.Model, HitCountMixin):
4040
negative_votes = models.IntegerField(default=0)
4141
total_points = models.IntegerField(default=0)
4242

43+
class Meta:
44+
ordering = ['-pub_date']
45+
4346
def save(self, *args, **kwargs):
4447
if not self.id:
4548
self.slug = slugify(self.title)

0 commit comments

Comments
 (0)