From 7808b5457d2e98207166b26affe602edacd91e7f Mon Sep 17 00:00:00 2001 From: Struan Donald Date: Tue, 28 Nov 2023 15:27:41 +0000 Subject: [PATCH] add update_averages call to importers missing it Some importers were not calculating an average value which meant there was no default value when a filter was selected. Fixes #327 --- hub/management/commands/import_christian_aid_group_locations.py | 1 + hub/management/commands/import_wi_group_locations.py | 1 + 2 files changed, 2 insertions(+) diff --git a/hub/management/commands/import_christian_aid_group_locations.py b/hub/management/commands/import_christian_aid_group_locations.py index b9f36ccdb..2af931e35 100644 --- a/hub/management/commands/import_christian_aid_group_locations.py +++ b/hub/management/commands/import_christian_aid_group_locations.py @@ -67,6 +67,7 @@ def handle(self, quiet=False, *args, **kwargs): self.add_data_sets() self.delete_data() self.process_data() + self.update_averages() self.update_max_min() def add_to_dict(self, df): diff --git a/hub/management/commands/import_wi_group_locations.py b/hub/management/commands/import_wi_group_locations.py index 4e6de463c..a192ac6f7 100644 --- a/hub/management/commands/import_wi_group_locations.py +++ b/hub/management/commands/import_wi_group_locations.py @@ -67,6 +67,7 @@ def handle(self, quiet=False, *args, **kwargs): self.add_data_sets() self.delete_data() self.process_data() + self.update_averages() self.update_max_min() def process_data(self):