api: display minimal_booking_delay_in_working_days on meetings agenda details (#57103)

This commit is contained in:
Nicolas Roche 2021-09-28 18:24:06 +02:00
parent b7811f5235
commit b9e6c9c55c
2 changed files with 4 additions and 0 deletions

View File

@ -362,6 +362,7 @@ def get_agenda_detail(request, agenda, check_events=False):
{'id': r.slug, 'text': r.label, 'description': r.description} for r in agenda.resources.all()
]
if agenda.kind == 'events':
agenda_detail['minimal_booking_delay_in_working_days'] = agenda.minimal_booking_delay_in_working_days
agenda_detail['api'] = {
'datetimes_url': request.build_absolute_uri(
reverse('api-agenda-datetimes', kwargs={'agenda_identifier': agenda.slug})

View File

@ -64,6 +64,7 @@ def test_agendas_api(app):
'slug': 'foo-bar',
'kind': 'events',
'minimal_booking_delay': 1,
'minimal_booking_delay_in_working_days': False,
'maximal_booking_delay': 56,
'edit_role': 'Edit',
'view_role': None,
@ -82,6 +83,7 @@ def test_agendas_api(app):
'kind': 'events',
'slug': 'foo-bar-2',
'minimal_booking_delay': 1,
'minimal_booking_delay_in_working_days': False,
'maximal_booking_delay': 56,
'edit_role': None,
'view_role': None,
@ -96,6 +98,7 @@ def test_agendas_api(app):
'kind': 'events',
'slug': 'foo-bar-3',
'minimal_booking_delay': 1,
'minimal_booking_delay_in_working_days': False,
'maximal_booking_delay': 56,
'edit_role': None,
'view_role': None,