diff --git a/core/migrations/0018_alter_order_human_readable_id.py b/core/migrations/0018_alter_order_human_readable_id.py index af9a1d8b..5e3bd33f 100644 --- a/core/migrations/0018_alter_order_human_readable_id.py +++ b/core/migrations/0018_alter_order_human_readable_id.py @@ -8,7 +8,7 @@ def fix_duplicates(apps, schema_editor): Order = apps.get_model("core", "Order") duplicates = ( Order.objects.values("human_readable_id") - .annotate(count=Count("id")) + .annotate(count=Count("uuid")) .filter(count__gt=1) ) for duplicate in duplicates: