Skip to content

Commit

Permalink
Revert "Add ordering for DifficultyTag and DiffultyTagLocalization (#438
Browse files Browse the repository at this point in the history
)" (#446)

This reverts commit 95da4bc.
  • Loading branch information
twalen authored Dec 16, 2024
1 parent 95da4bc commit 9d32a09
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 20 deletions.
17 changes: 0 additions & 17 deletions oioioi/problems/migrations/0032_alter_difficultytag_options.py

This file was deleted.

1 change: 0 additions & 1 deletion oioioi/problems/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -834,7 +834,6 @@ class DifficultyTag(models.Model):
class Meta(object):
verbose_name = _("difficulty tag")
verbose_name_plural = _("difficulty tags")
ordering = ["pk"]

def __str__(self):
return str(self.name)
Expand Down
4 changes: 2 additions & 2 deletions oioioi/problems/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,7 @@ def problemset_generate_view(request, page_title, problems, view_type):

difficulty_tags = DifficultyTag.objects.filter(
name__in=request.GET.getlist('difficulty')
).order_by("name")
)

return TemplateResponse(
request,
Expand Down Expand Up @@ -553,7 +553,7 @@ def problem_site_view(request, site_key):
)
difficulty_options = (
tag.full_name
for tag in DifficultyTagLocalization.objects.filter(language=get_language()).order_by("full_name")
for tag in DifficultyTagLocalization.objects.filter(language=get_language())
)
context = {
'problem': problem,
Expand Down

0 comments on commit 9d32a09

Please sign in to comment.