cartads: don't crash on dossier types without any subjects (#33506)
This commit is contained in:
parent
370fb9f437
commit
1be5d77be9
|
@ -158,7 +158,7 @@ class AbstractCartaDSCS(BaseResource):
|
|||
def objets_demande(self, request, type_dossier_id):
|
||||
client = self.soap_client()
|
||||
resp = client.service.GetObjetsDemande(self.get_token(), type_dossier_id)
|
||||
return {'data': [{'id': str(x['Key']), 'text': x['Value']} for x in resp]}
|
||||
return {'data': [{'id': str(x['Key']), 'text': x['Value']} for x in resp or []]}
|
||||
|
||||
@endpoint(description=_('Get list of CERFA documents'),
|
||||
parameters={
|
||||
|
|
Loading…
Reference in New Issue