Skip to content

Commit fd465b8

Browse files
BlueShift EducationBlueShift Education
authored andcommitted
updated sorting field from 'name' to 'key'
1 parent c7af0f5 commit fd465b8

File tree

3 files changed

+28
-3
lines changed

3 files changed

+28
-3
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Generated by Django 5.1.2 on 2025-05-19 16:10
2+
3+
from django.db import migrations
4+
5+
6+
class Migration(migrations.Migration):
7+
8+
dependencies = [
9+
('api_v2', '0042_alter_image_options_alter_rule_options_and_more'),
10+
]
11+
12+
operations = [
13+
migrations.AlterModelOptions(
14+
name='image',
15+
options={'ordering': ['key']},
16+
),
17+
migrations.AlterModelOptions(
18+
name='rule',
19+
options={'ordering': ['key']},
20+
),
21+
migrations.AlterModelOptions(
22+
name='ruleset',
23+
options={'ordering': ['key']},
24+
),
25+
]

api_v2/models/image.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def file_url(self):
3939
return static(self.file_path)
4040

4141
class Meta:
42-
ordering = ['name']
42+
ordering = ['key']
4343

4444

4545
class HasIcon(models.Model):

api_v2/models/rule.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class RuleSet(HasName, HasDescription, FromDocument):
1010
key = key_field()
1111

1212
class Meta:
13-
ordering = ['name']
13+
ordering = ['key']
1414

1515
class Rule(HasName, HasDescription, FromDocument):
1616
""""
@@ -39,4 +39,4 @@ class Rule(HasName, HasDescription, FromDocument):
3939
)
4040

4141
class Meta:
42-
ordering = ['name']
42+
ordering = ['key']

0 commit comments

Comments
 (0)