Skip to content

Commit

Permalink
[Fix] Sort map layers by order instead of label (fix: Georiviere-publ…
Browse files Browse the repository at this point in the history
…ic#53) (#251)
  • Loading branch information
babastienne authored Apr 30, 2024
1 parent 58c82e1 commit dc70fe6
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
17 changes: 17 additions & 0 deletions georiviere/portal/migrations/0009_auto_20240430_1309.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Generated by Django 3.1.14 on 2024-04-30 13:09

from django.db import migrations


class Migration(migrations.Migration):

dependencies = [
('portal', '0008_auto_20240429_1233'),
]

operations = [
migrations.AlterModelOptions(
name='mapbaselayer',
options={'ordering': ('order',), 'verbose_name': 'Map base layer', 'verbose_name_plural': 'Map base layers'},
),
]
2 changes: 1 addition & 1 deletion georiviere/portal/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class MapBaseLayer(models.Model):
class Meta:
verbose_name = _("Map base layer")
verbose_name_plural = _("Map base layers")
ordering = ('label',)
ordering = ('order',)
unique_together = ('label', 'portal')

def __str__(self):
Expand Down

0 comments on commit dc70fe6

Please sign in to comment.