chrono: normalize identifiant_predemande when received (#83552)
gitea/ants-hub/pipeline/head This commit looks good
Details
gitea/ants-hub/pipeline/head This commit looks good
Details
This commit is contained in:
parent
98c1546c48
commit
64cbac4ccc
|
@ -165,7 +165,7 @@ class RendezVousDisponibleView(View):
|
|||
def handle_rdv_payload(self, lieu, rdv):
|
||||
# cannot fail, as JSON schema is already validated
|
||||
rdv = rdv.copy()
|
||||
identifiant_predemande = rdv.pop('id').strip()
|
||||
identifiant_predemande = rdv.pop('id').strip().upper()
|
||||
date = datetime.datetime.fromisoformat(rdv.pop('date'))
|
||||
annule = bool(rdv.pop('annule', False))
|
||||
rdv.setdefault('gestion_url', '')
|
||||
|
|
|
@ -751,10 +751,10 @@ def test_rendez_vous_disponibles_full(django_app, db, freezer):
|
|||
assert RendezVous.objects.filter(canceled__isnull=False).count() == 1
|
||||
assert set(
|
||||
RendezVous.objects.filter(canceled__isnull=True).values_list('identifiant_predemande', flat=True)
|
||||
) == {'abcd1', 'abcd3'}
|
||||
) == {'ABCD1', 'ABCD3'}
|
||||
assert set(
|
||||
RendezVous.objects.filter(canceled__isnull=False).values_list('identifiant_predemande', flat=True)
|
||||
) == {'abcd2'}
|
||||
) == {'ABCD2'}
|
||||
# check objects are not updated/created uselessly
|
||||
assert plage_last_update >= set(Plage.objects.values_list('last_update', flat=True))
|
||||
assert rendez_vous_last_update >= set(
|
||||
|
|
Loading…
Reference in New Issue