Skip to content

Commit

Permalink
fix amount on synchro
Browse files Browse the repository at this point in the history
  • Loading branch information
madjid-asa committed Oct 18, 2024
1 parent 70a6223 commit a83a6e3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lemarche/utils/apis/api_brevo.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
from huey.contrib.djhuey import task
from sib_api_v3_sdk.rest import ApiException

from lemarche.tenders.constants import AMOUNT_RANGE_CHOICE_EXACT
from lemarche.utils.constants import EMAIL_SUBJECT_PREFIX
from lemarche.utils.data import sanitize_to_send_by_email
from lemarche.utils.urls import get_object_admin_url, get_object_share_url
Expand Down Expand Up @@ -170,7 +169,7 @@ def create_deal(tender, owner_email: str):
"deal_owner": owner_email,
"close_date": tender.deadline_date.strftime("%Y-%m-%d"),
# custom attributes
"amount": AMOUNT_RANGE_CHOICE_EXACT.get(tender.amount, 0),
"amount": tender.amount_int,
"tender_admin_url": tender.get_admin_url(),
},
)
Expand All @@ -184,6 +183,7 @@ def create_deal(tender, owner_email: str):
tender.save()
except ApiException as e:
logger.error("Exception when calling Brevo->DealApi->create_deal: %s\n" % e)
raise ApiException(e)


def link_deal_with_contact_list(tender, contact_list: list = None):
Expand Down

0 comments on commit a83a6e3

Please sign in to comment.