toulouse-foederis: send offer id in good field when applying (#81476)
gitea/passerelle/pipeline/head This commit looks good Details

This commit is contained in:
Corentin Sechet 2023-09-22 09:52:54 +02:00 committed by Corentin Sechet
parent a192a953b9
commit 649c1c05a8
2 changed files with 3 additions and 3 deletions

View File

@ -509,7 +509,7 @@ class Resource(BaseResource, HTTPResource):
'emploi': 'R15017962',
'niveau_diplome': 'R1249737',
'habilitation': 'R1276043',
'offre': FIELD_ANNOUNCE_FKEY_DEMANDE_DE_PERSONNEL,
'offre': 'R14846954',
}
def update_referentiels(self):
@ -608,7 +608,7 @@ class Resource(BaseResource, HTTPResource):
if announce_id is not None:
# passerelle catch DoesNotExist and converts it to 404
announce_document = self.announces_documents.get(external_id=f'announce-{announce_id}')
offer_id = announce_document.data['offer_id']
offer_id = str(announce_document.data['offer_id'])
request_data = {
'type_de_candidature': post_data.get('type', 'E'),

View File

@ -528,7 +528,7 @@ class TestEndpoints:
)
expected_payload.update(
{'annonce': int(announce_id), 'candidature_spontane': 'N', 'R14848258': 'ID_OFFRE'}
{'annonce': int(announce_id), 'candidature_spontane': 'N', 'R14846954': 'ID_OFFRE'}
)
external_id = f'announce-{announce_id}'