diff --git a/clevercloud/siaes_update_count_fields.sh b/clevercloud/siaes_update_count_fields.sh index 2c559a6bf..f8b388c9d 100755 --- a/clevercloud/siaes_update_count_fields.sh +++ b/clevercloud/siaes_update_count_fields.sh @@ -20,4 +20,4 @@ fi cd $APP_HOME # django-admin update_siae_count_fields -django-admin update_siae_count_fields --fields etablissement_count +django-admin update_siae_count_fields --fields etablissement_count --fields completion_rate diff --git a/lemarche/siaes/management/commands/update_siae_count_fields.py b/lemarche/siaes/management/commands/update_siae_count_fields.py index 01e6b76b9..ad1b180ce 100644 --- a/lemarche/siaes/management/commands/update_siae_count_fields.py +++ b/lemarche/siaes/management/commands/update_siae_count_fields.py @@ -14,6 +14,7 @@ "label_count", "image_count", "etablissement_count", + "completion_rate", ] @@ -67,6 +68,8 @@ def handle(self, *args, **options): # etablissement_count if siae.is_active and siae.siren: siae.etablissement_count = siae_utils.calculate_etablissement_count(siae) + # completion_rate + siae.completion_rate = siae.completion_rate_calculated # Step 3: update count fields siae.save(update_fields=update_fields)