Skip to content

Commit

Permalink
fix(Activités des structures): Correction de l'affichage des fiches s…
Browse files Browse the repository at this point in the history
…tructures sans type de prestation (#1532)
  • Loading branch information
SebastienReuiller authored Nov 21, 2024
1 parent fa792d0 commit 810669e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion lemarche/siaes/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -1582,7 +1582,7 @@ class Meta:

@property
def presta_type_display(self) -> str:
return choice_array_to_values(siae_constants.PRESTA_CHOICES, self.presta_type)
return choice_array_to_values(siae_constants.PRESTA_CHOICES, self.presta_type) if self.presta_type else ""

@property
def geo_range_pretty_display(self):
Expand Down
12 changes: 7 additions & 5 deletions lemarche/templates/siaes/_siae_activity_content.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,13 @@ <h3 class="fr-accordion__title">
<ul>
{% siae_sectors_display activity display_max=6 output_format='li' %}
</ul>
<p class="fr-mt-4w">
<span class="fr-icon-briefcase-line" aria-hidden="true"></span>
<span class="fr-sr-only">Type(s) de prestation :</span>
<span>{{ activity.presta_type_display }}</span>
</p>
{% if activity.presta_type %}
<p class="fr-mt-4w">
<span class="fr-icon-briefcase-line" aria-hidden="true"></span>
<span class="fr-sr-only">Type(s) de prestation :</span>
<span>{{ activity.presta_type_display }}</span>
</p>
{% endif %}
<p>
<span class="fr-icon-map-pin-2-line" aria-hidden="true"></span>
<span class="fr-sr-only">Intervient sur :</span>
Expand Down

0 comments on commit 810669e

Please sign in to comment.