diff --git a/src/economy/migrations/0015_auto_20200813_2345.py b/src/economy/migrations/0015_auto_20200813_2345.py new file mode 100644 index 00000000..cee066f1 --- /dev/null +++ b/src/economy/migrations/0015_auto_20200813_2345.py @@ -0,0 +1,16 @@ +# Generated by Django 3.1 on 2020-08-13 21:45 + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ("economy", "0014_posreport_comments"), + ] + + operations = [ + migrations.AlterModelOptions( + name="posreport", options={"ordering": ["date", "pos"]}, + ), + ] diff --git a/src/economy/models.py b/src/economy/models.py index 1ab983f3..774df5f1 100644 --- a/src/economy/models.py +++ b/src/economy/models.py @@ -517,6 +517,9 @@ class Pos(CampRelatedModel, UUIDModel): class PosReport(CampRelatedModel, UUIDModel): """A PosReport contains the HAX/DKK counts and the csv report from the POS system.""" + class Meta: + ordering = ["date", "pos"] + pos = models.ForeignKey( "economy.Pos", on_delete=models.PROTECT,