Skip to content

Commit c7ef806

Browse files
daveoconnorkarimarie67
authored andcommitted
Added setting true of fully_completed on existing versions in migration (boostorg#1744)
1 parent c6335c2 commit c7ef806

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

versions/migrations/0023_version_fully_imported.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
from django.db import migrations, models
44

55

6+
def update_fully_imported(apps, schema_editor):
7+
Version = apps.get_model("versions", "Version")
8+
Version.objects.all().update(fully_imported=True)
9+
610
class Migration(migrations.Migration):
711

812
dependencies = [
@@ -18,4 +22,5 @@ class Migration(migrations.Migration):
1822
help_text="Whether this version has been fully imported and is ready for use.",
1923
),
2024
),
25+
migrations.RunPython(update_fully_imported, migrations.RunPython.noop),
2126
]

0 commit comments

Comments
 (0)