diff --git a/datastore/additional_data/management/commands/rewrite_additional_data.py b/datastore/additional_data/management/commands/rewrite_additional_data.py index 1dfd65e9..2f01fed5 100644 --- a/datastore/additional_data/management/commands/rewrite_additional_data.py +++ b/datastore/additional_data/management/commands/rewrite_additional_data.py @@ -29,4 +29,5 @@ def handle(self, *args, **options): for grant in grants: additional_data = generator.create(grant.data) grant.additional_data = additional_data - grant.save() + + Grant.objects.bulk_update(grants, ["additional_data"], batch_size=10000)