Skip to content

Commit

Permalink
add buyers to brevo list in task
Browse files Browse the repository at this point in the history
  • Loading branch information
madjid-asa committed Dec 29, 2023
1 parent 04583ee commit a4c2140
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lemarche/www/auth/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

from lemarche.users import constants as user_constants
from lemarche.users.models import User
from lemarche.utils.apis import api_hubspot, api_mailjet
from lemarche.utils.apis import api_brevo, api_hubspot, api_mailjet
from lemarche.utils.emails import send_mail_async, whitelist_recipient_list
from lemarche.utils.urls import get_domain_url

Expand Down Expand Up @@ -95,7 +95,9 @@ def add_to_contact_list(user: User, type: str, source: str = user_constants.SOUR
if type == "signup":
contact_list_id = get_mailjet_cl_on_signup(user, source)
if user.kind == user.KIND_BUYER:
# TODO: we still use it ?
api_hubspot.add_user_to_crm(user)
api_brevo.create_contact(user=user, list_id=settings.BREVO_CL_SIGNUP_BUYER_ID)
elif type == "buyer_search":
contact_list_id = settings.MAILJET_NL_CL_BUYER_SEARCH_SIAE_LIST_ID
elif type == "buyer_search_traiteur":
Expand Down

0 comments on commit a4c2140

Please sign in to comment.