Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(Activités des structures): Correction de l'affichage des fiches structures sans type de prestation #1532

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading