diff --git a/bims/management/commands/fix_duplicate_site_codes.py b/bims/management/commands/fix_duplicate_site_codes.py index 6e9b280d5..3af2737f3 100644 --- a/bims/management/commands/fix_duplicate_site_codes.py +++ b/bims/management/commands/fix_duplicate_site_codes.py @@ -33,7 +33,7 @@ def handle(self, *args, **options): preferences.SiteSetting.site_code_generator) for site in sites: print('Updating {}'.format(site.id)) - site_code = generate_site_code( + site_code = generate_site_code( site, site.latitude, site.longitude diff --git a/bims/tasks/location_context.py b/bims/tasks/location_context.py index 8fe9cd2c4..aa164cbf4 100644 --- a/bims/tasks/location_context.py +++ b/bims/tasks/location_context.py @@ -157,7 +157,9 @@ def generate_spatial_scale_filter(): location_filter_group_order = ( LocationContextFilterGroupOrder.objects.filter( filter_id=location_context_filter.id, - group_id=group.id).first() + group_id=group.id, + is_hidden_in_spatial_filter=False + ).first() ) if not location_filter_group_order: