Skip to content

Commit

Permalink
Hotfix url construction in j+30 transaction email. ref #865
Browse files Browse the repository at this point in the history
  • Loading branch information
raphodn committed Sep 12, 2023
1 parent c7cace2 commit 44dbc66
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lemarche/www/tenders/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from lemarche.utils.apis import api_mailjet, api_slack
from lemarche.utils.data import date_to_string
from lemarche.utils.emails import send_mail_async, whitelist_recipient_list
from lemarche.utils.urls import get_admin_url_object, get_share_url_object
from lemarche.utils.urls import get_admin_url_object, get_domain_url, get_share_url_object


# @task()
Expand Down Expand Up @@ -504,7 +504,9 @@ def send_tenders_author_30_days(tender: Tender, kind="feedback"):
template_id = settings.MAILJET_TENDERS_AUTHOR_TRANSACTIONED_QUESTION_30D_TEMPLATE_ID
user_sesame_query_string = sesame_get_query_string(tender.author) # TODO: sesame scope parameter
answer_url_with_sesame_token = (
reverse("tenders:detail-survey-transactioned", args=[tender.slug]) + user_sesame_query_string
f"https://{get_domain_url()}"
+ reverse("tenders:detail-survey-transactioned", args=[tender.slug])
+ user_sesame_query_string
)
variables["ANSWER_YES_URL"] = answer_url_with_sesame_token + "&answer=true"
variables["ANSWER_NO_URL"] = answer_url_with_sesame_token + "&answer=false"
Expand Down

0 comments on commit 44dbc66

Please sign in to comment.