toulouse-maelis: send authorized person list on update-child (#71645)
This commit is contained in:
parent
561fcb8471
commit
2fbdbf19d7
|
@ -794,13 +794,17 @@ class ToulouseMaelis(BaseResource, HTTPResource):
|
||||||
def update_child(self, request, NameID, child_id, post_data):
|
def update_child(self, request, NameID, child_id, post_data):
|
||||||
family_id = self.get_link(NameID).family_id
|
family_id = self.get_link(NameID).family_id
|
||||||
family = self.get_family_raw(family_id)
|
family = self.get_family_raw(family_id)
|
||||||
if child_id not in [x['num'] for x in family['childList']]:
|
|
||||||
raise APIError('No child %s to update on family' % child_id, err_code='no-child')
|
|
||||||
self.assert_child_payload_in_referential(post_data)
|
self.assert_child_payload_in_referential(post_data)
|
||||||
self.replace_null_values(post_data)
|
self.replace_null_values(post_data)
|
||||||
|
|
||||||
child = post_data
|
child = post_data
|
||||||
child['num'] = child_id
|
child['num'] = child_id
|
||||||
|
for known_child in family['childList']:
|
||||||
|
if str(known_child['num']) == child_id:
|
||||||
|
child['authorizedPersonList'] = known_child['authorizedPersonList']
|
||||||
|
break
|
||||||
|
else:
|
||||||
|
raise APIError('No child %s to update on family' % child_id, err_code='no-child')
|
||||||
payload = {
|
payload = {
|
||||||
'dossierNumber': family_id,
|
'dossierNumber': family_id,
|
||||||
'category': family['category'],
|
'category': family['category'],
|
||||||
|
|
|
@ -25,6 +25,25 @@
|
||||||
</birth>
|
</birth>
|
||||||
<bPhoto>true</bPhoto>
|
<bPhoto>true</bPhoto>
|
||||||
<bLeaveAlone>false</bLeaveAlone>
|
<bLeaveAlone>false</bLeaveAlone>
|
||||||
|
<authorizedPersonList>
|
||||||
|
<personInfo>
|
||||||
|
<num>614719</num>
|
||||||
|
<lastname>BENT</lastname>
|
||||||
|
<firstname>AMEL</firstname>
|
||||||
|
<dateBirth>1985-06-21T00:00:00+02:00</dateBirth>
|
||||||
|
<civility>MME</civility>
|
||||||
|
<sexe>F</sexe>
|
||||||
|
<contact>
|
||||||
|
<phone>0123456789</phone>
|
||||||
|
<mobile>0623456789</mobile>
|
||||||
|
<mail>abent@example.org</mail>
|
||||||
|
</contact>
|
||||||
|
</personInfo>
|
||||||
|
<personQuality>
|
||||||
|
<code>T</code>
|
||||||
|
<libelle>TANTE</libelle>
|
||||||
|
</personQuality>
|
||||||
|
</authorizedPersonList>
|
||||||
</childList>
|
</childList>
|
||||||
</ns0:updateFamily>
|
</ns0:updateFamily>
|
||||||
</soap-env:Body>
|
</soap-env:Body>
|
||||||
|
|
Loading…
Reference in New Issue