From b83aecd754e824249f84fec9c9367bfb436c91da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Reuiller?= Date: Thu, 5 Dec 2024 12:48:41 +0100 Subject: [PATCH] fix: 'set' object is not subscriptable --- lemarche/siaes/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lemarche/siaes/models.py b/lemarche/siaes/models.py index 646fdcbd0..015fdd1c1 100644 --- a/lemarche/siaes/models.py +++ b/lemarche/siaes/models.py @@ -1195,7 +1195,7 @@ def latest_activity_at(self): def sector_groups_list_string(self, display_max=3): # Retrieve sectors from activities instead of directly from the sectors field - sectors_name_list = set(self.activities.values_list("sector_group__name", flat=True)) + sectors_name_list = list(set(self.activities.values_list("sector_group__name", flat=True))) if display_max and len(sectors_name_list) > display_max: sectors_name_list = sectors_name_list[:display_max] sectors_name_list.append("…")