Skip to content

armgit / wger

Public Imported from GitHub
0

Self hosted FLOSS fitness/workout, nutrition and weight tracker

Sort the measurement categories by name, ascending

Roland Geidera13e41520b30
diff --git a/wger/measurements/migrations/0006_health_sync.py b/wger/measurements/migrations/0006_health_sync.py
index d1332f88b..41fcc51fb 100644
--- a/wger/measurements/migrations/0006_health_sync.py
+++ b/wger/measurements/migrations/0006_health_sync.py
@@ -13,7 +13,7 @@ class Migration(migrations.Migration):
operations = [
migrations.AlterModelOptions(
name='category',
- options={'ordering': ['order', '-name']},
+ options={'ordering': ['order', 'name']},
),
migrations.AddField(
model_name='category',
diff --git a/wger/measurements/models/category.py b/wger/measurements/models/category.py
index 98b2d4572..47e1544c7 100644
--- a/wger/measurements/models/category.py
+++ b/wger/measurements/models/category.py
@@ -150,7 +150,7 @@ class Category(models.Model):
class Meta:
ordering = [
'order',
- '-name',
+ 'name',
]
constraints = [
# A typed category is the one place its metric lives: the health