Skip to content

Commit

Permalink
Fix linting issues
Browse files Browse the repository at this point in the history
  • Loading branch information
chloend committed Oct 24, 2024
1 parent 79327ea commit 9a7d97c
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions lemarche/utils/apis/api_brevo.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ def get_api_client():

def create_contact(user, list_id: int, tender_id: int = None):
from lemarche.tenders.models import Tender

"""
Brevo docs
- Python library: https://github.com/sendinblue/APIv3-python-library/blob/master/docs/CreateContact.md
Expand All @@ -39,17 +40,17 @@ def create_contact(user, list_id: int, tender_id: int = None):
api_client = get_api_client()
api_instance = sib_api_v3_sdk.ContactsApi(api_client)

attributes={
"NOM": sanitize_to_send_by_email(user.last_name.capitalize()),
"PRENOM": sanitize_to_send_by_email(user.first_name.capitalize()),
"DATE_INSCRIPTION": user.created_at,
"TYPE_ORGANISATION": user.buyer_kind_detail,
"NOM_ENTREPRISE": sanitize_to_send_by_email(user.company_name.capitalize()),
"SMS": sanitize_to_send_by_email(user.phone_display),
"MONTANT_BESOIN_ACHETEUR": None,
"TYPE_BESOIN_ACHETEUR": None,
"TYPE_VERTICALE_ACHETEUR": [],
# WHATSAPP, TYPE_ORGANISATION, LIEN_FICHE_COMMERCIALE, TAUX_DE_COMPLETION
attributes = {
"NOM": sanitize_to_send_by_email(user.last_name.capitalize()),
"PRENOM": sanitize_to_send_by_email(user.first_name.capitalize()),
"DATE_INSCRIPTION": user.created_at,
"TYPE_ORGANISATION": user.buyer_kind_detail,
"NOM_ENTREPRISE": sanitize_to_send_by_email(user.company_name.capitalize()),
"SMS": sanitize_to_send_by_email(user.phone_display),
"MONTANT_BESOIN_ACHETEUR": None,
"TYPE_BESOIN_ACHETEUR": None,
"TYPE_VERTICALE_ACHETEUR": [],
# WHATSAPP, TYPE_ORGANISATION, LIEN_FICHE_COMMERCIALE, TAUX_DE_COMPLETION
}

if tender_id:
Expand Down

0 comments on commit 9a7d97c

Please sign in to comment.