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

Recherche : enlever les inscriptions des acheteurs aux listes Mailjet #908

Merged
merged 1 commit into from
Sep 18, 2023
Merged
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
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