diff --git a/oioioi/problems/migrations/0032_alter_difficultytag_options.py b/oioioi/problems/migrations/0032_alter_difficultytag_options.py deleted file mode 100644 index 88a7e2fe9..000000000 --- a/oioioi/problems/migrations/0032_alter_difficultytag_options.py +++ /dev/null @@ -1,17 +0,0 @@ -# Generated by Django 4.2.17 on 2024-12-15 12:52 - -from django.db import migrations - - -class Migration(migrations.Migration): - - dependencies = [ - ('problems', '0031_auto_20220328_1124'), - ] - - operations = [ - migrations.AlterModelOptions( - name='difficultytag', - options={'ordering': ['pk'], 'verbose_name': 'difficulty tag', 'verbose_name_plural': 'difficulty tags'}, - ), - ] diff --git a/oioioi/problems/models.py b/oioioi/problems/models.py index 52e035171..c67b29a5c 100644 --- a/oioioi/problems/models.py +++ b/oioioi/problems/models.py @@ -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) diff --git a/oioioi/problems/views.py b/oioioi/problems/views.py index 02d3dfc4e..3aab16ba6 100644 --- a/oioioi/problems/views.py +++ b/oioioi/problems/views.py @@ -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, @@ -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,