From 23edc29bb81c1ab6671fb43f57c19b1a28543767 Mon Sep 17 00:00:00 2001 From: Tom Hacohen Date: Tue, 10 Mar 2020 17:56:24 +0200 Subject: [PATCH] Chunks: order based on item too so items are clustered together. --- .../migrations/0023_auto_20200310_1556.py | 17 +++++++++++++++++ django_etesync/models.py | 2 +- 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 django_etesync/migrations/0023_auto_20200310_1556.py diff --git a/django_etesync/migrations/0023_auto_20200310_1556.py b/django_etesync/migrations/0023_auto_20200310_1556.py new file mode 100644 index 0000000..e2a9b80 --- /dev/null +++ b/django_etesync/migrations/0023_auto_20200310_1556.py @@ -0,0 +1,17 @@ +# Generated by Django 3.0.3 on 2020-03-10 15:56 + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('django_etesync', '0022_auto_20200310_1547'), + ] + + operations = [ + migrations.AlterModelOptions( + name='collectionitemchunk', + options={'ordering': ('item', 'order')}, + ), + ] diff --git a/django_etesync/models.py b/django_etesync/models.py index d996769..df25867 100644 --- a/django_etesync/models.py +++ b/django_etesync/models.py @@ -71,7 +71,7 @@ class CollectionItemChunk(models.Model): class Meta: unique_together = ('item', 'order') - ordering = ['order'] + ordering = ('item', 'order') def __str__(self): return self.uid