misc: use ANTS_HUB_BASE_URL to make callback_url (#89701)
gitea/ants-hub/pipeline/head Build queued... Details

This commit is contained in:
Benjamin Dauvergne 2024-04-18 10:03:29 +02:00
parent 13a9f6e7af
commit 65b6954dc3
2 changed files with 3 additions and 3 deletions

View File

@ -1,4 +1,4 @@
BASE_URL = 'http://127.0.0.1:9040/'
ANTS_HUB_BASE_URL = 'http://127.0.0.1:9040'
SECRET_KEY = '1234'
LOGGING = {
'version': 1,

View File

@ -151,7 +151,7 @@ def available_time_slots(request):
)
types_de_rdv = [reason]
base_url = getattr(settings, 'BASE_URL', None)
base_url = getattr(settings, 'ANTS_HUB_BASE_URL', None)
if not base_url:
base_callback_url = request.build_absolute_uri('/')
@ -231,7 +231,7 @@ WHERE
if not base_url:
callback_url = urllib.parse.urljoin(base_callback_url, url)
else:
callback_url = base_url + url
callback_url = urllib.parse.urljoin(base_url, url)
if date not in date_by_lieu[lieu_pk]:
# prevent the same datetime to be reported multiple times
date_by_lieu[lieu_pk].add(date)