Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ebpub/ebpub/db/migrations/0026_make_unique_lookup_names.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class Migration(DataMigration):
def forwards(self, orm):
"Write your forwards methods here."
# Ensure names are unique.
for lname in orm['db.lookup'].objects.all().distinct('name').values_list('name'):
for lname in orm['db.lookup'].objects.all().distinct('name').order_by('name').values_list('name'):
lname = lname[0]
for sf in orm['db.schemafield'].objects.all():
with_name = orm['db.lookup'].objects.filter(name=lname, schema_field=sf)
Expand Down