Skip to content

Commit

Permalink
fix: 'set' object is not subscriptable
Browse files Browse the repository at this point in the history
  • Loading branch information
SebastienReuiller committed Dec 5, 2024
1 parent 0a27eca commit b83aecd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lemarche/siaes/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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("…")
Expand Down

0 comments on commit b83aecd

Please sign in to comment.