Version: drop file field, use files instead #193

Merged
Oleg-Komarov merged 6 commits from version-drop-file into main 2024-06-21 11:29:22 +02:00
Showing only changes of commit 15fc366580 - Show all commits

View File

@ -8,8 +8,6 @@ def populate_file(apps, schema_editor):
to_update = []
for v in Version.objects.all():
v.file = v.files.first()
if v.file is None:
print(v)
to_update.append(v)
Version.objects.bulk_update(to_update, ['file'])