Skip to content

Commit

Permalink
display prest type of activity instead
Browse files Browse the repository at this point in the history
  • Loading branch information
SebastienReuiller committed Nov 20, 2024
1 parent 9255755 commit 3d2bc61
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lemarche/siaes/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -1008,8 +1008,12 @@ def presta_type_display(self) -> str:
return "Intérim"
if self.kind == siae_constants.KIND_AI:
return "Mise à disposition du personnel"
if self.presta_type:
return choice_array_to_values(siae_constants.PRESTA_CHOICES, self.presta_type)
if self.activities.exists():
presta_types = set()
for activity in self.activities.all():
if activity.presta_type:
presta_types.update(activity.presta_type)
return choice_array_to_values(siae_constants.PRESTA_CHOICES, list(presta_types))
return ""

@property
Expand Down

0 comments on commit 3d2bc61

Please sign in to comment.