Skip to content

Commit

Permalink
Ordering fix (#478)
Browse files Browse the repository at this point in the history
  • Loading branch information
kovacspe authored Dec 14, 2024
1 parent b41d2b6 commit a6d6e1f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cms/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class PostViewSet(viewsets.ModelViewSet):
filterset_fields = ['sites']
search_fields = ['caption', 'short_text', 'details']
ordering_fields = ['added_at', 'visible_until', 'visible_after']
ordering = ['added_at']
ordering = ['-added_at']

@action(detail=False)
def visible(self, request):
Expand Down
2 changes: 1 addition & 1 deletion competition/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ class Series(models.Model):
class Meta:
verbose_name = 'séria'
verbose_name_plural = 'série'
ordering = ['semester', '-order', ]
ordering = ['semester', 'order', ]

semester = models.ForeignKey(
Semester, verbose_name='semester', on_delete=models.CASCADE)
Expand Down

0 comments on commit a6d6e1f

Please sign in to comment.