Skip to content

Commit

Permalink
Recherche : enlever les inscriptions des acheteurs aux listes Mailjet (
Browse files Browse the repository at this point in the history
…#911)

Co-authored-by: Raphael Odini <[email protected]>
  • Loading branch information
SebastienReuiller and raphodn authored Sep 18, 2023
1 parent 6ae167a commit e53e80b
Showing 1 changed file with 0 additions and 30 deletions.
30 changes: 0 additions & 30 deletions lemarche/www/siaes/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,36 +128,6 @@ def get_context_data(self, **kwargs):
)
return context

def get(self, request, *args, **kwargs):
"""
Additional actions:
- add buyer to contact list
- add buyer who searched for sector 'traiteur' to contact list
- add buyer who searched for sector 'nettoyage' to contact list
"""
self.object_list = self.get_queryset()
user = request.user
context = self.get_context_data()
if user.is_authenticated:
if user.kind == user.KIND_BUYER:
add_to_contact_list(user, "buyer_search")
if "current_sectors" in context:
if next(
(sector for sector in context["current_sectors"] if sector["slug"] == SECTOR_TRAITEUR_SLUG),
False,
):
add_to_contact_list(user, "buyer_search_traiteur")
if next(
(
sector
for sector in context["current_sectors"]
if sector["slug"] in SECTOR_GROUP_HYGIERE_SLUG_LIST
),
False,
):
add_to_contact_list(user, "buyer_search_nettoyage")
return self.render_to_response(context)


class SiaeSearchResultsDownloadView(LoginRequiredMixin, View):
http_method_names = ["get"]
Expand Down

0 comments on commit e53e80b

Please sign in to comment.