diff --git a/lemarche/templates/siaes/_card_search_result.html b/lemarche/templates/siaes/_card_search_result.html index efeb06ea7..b01a0063b 100644 --- a/lemarche/templates/siaes/_card_search_result.html +++ b/lemarche/templates/siaes/_card_search_result.html @@ -6,14 +6,14 @@
{% if siae.logo_url %} Logo de la structure {{ siae.name }} + class="fr-responsive-img" + alt="Logo de la structure {{ siae.name }}" + loading="lazy" /> {% else %} {{ siae.name }} + class="fr-responsive-img" + alt="{{ siae.name }}" + loading="lazy" /> {% endif %}
@@ -27,7 +27,7 @@

{% if siae.is_qpv %}
  • QPV + title="Quartier prioritaire de la politique de la ville">QPV
  • {% endif %} {% if siae.is_zrr %} @@ -39,34 +39,29 @@

  • {% if user.is_authenticated %} {% if from_profile or siae.in_user_favorite_list_count_annotated %} - + {% else %} - {% endif %} {% else %} - {% endif %} @@ -82,17 +77,28 @@

  • -

    {% siae_sectors_display siae display_max=3 current_search_query=current_search_query %}

    -
    - -
    -

    {{ siae.city }} - - {{ siae.geo_range_pretty_display }}

    +
    +
    +
    +
    + {% if user.is_authenticated and user.is_admin and not siae.user_count %}

    pas encore inscrite

    {% endif %} diff --git a/lemarche/www/siaes/forms.py b/lemarche/www/siaes/forms.py index 4148caf48..ad23b80d9 100644 --- a/lemarche/www/siaes/forms.py +++ b/lemarche/www/siaes/forms.py @@ -230,6 +230,8 @@ def filter_queryset(self, qs=None): # noqa C901 if not hasattr(self, "cleaned_data"): self.full_clean() + qs = qs.prefetch_related("activities__sector_group") + sectors = self.cleaned_data.get("sectors", None) if sectors: qs = qs.filter_sectors(sectors)