fix ordering of PosReports

This commit is contained in:
Thomas Steen Rasmussen 2020-08-13 23:46:21 +02:00
parent c2abdfc89f
commit adf9dcd8d8
2 changed files with 19 additions and 0 deletions

View file

@ -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"]},
),
]

View file

@ -517,6 +517,9 @@ class Pos(CampRelatedModel, UUIDModel):
class PosReport(CampRelatedModel, UUIDModel): class PosReport(CampRelatedModel, UUIDModel):
"""A PosReport contains the HAX/DKK counts and the csv report from the POS system.""" """A PosReport contains the HAX/DKK counts and the csv report from the POS system."""
class Meta:
ordering = ["date", "pos"]
pos = models.ForeignKey( pos = models.ForeignKey(
"economy.Pos", "economy.Pos",
on_delete=models.PROTECT, on_delete=models.PROTECT,