toulouse-maelis: do not crash on agenda if we get no type (#77116) #233
|
@ -2152,7 +2152,7 @@ class ToulouseMaelis(BaseResource, HTTPResource):
|
|||
for result_data in response or []:
|
||||
for schedule in result_data['activityScheduleList']:
|
||||
activity = schedule['activity']
|
||||
if not activity['activityType']['natureSpec']:
|
||||
if not activity.get('activityType') or not activity['activityType'].get('natureSpec'):
|
||||
continue
|
||||
if (
|
||||
activity['activityType']['natureSpec']['code'] not in self.get_perisco_nature_codes()
|
||||
|
|
|
@ -254,6 +254,29 @@
|
|||
</activityType>
|
||||
</activity>
|
||||
</activityScheduleList>
|
||||
<activityScheduleList>
|
||||
<activity>
|
||||
<idAct>A10049327682</idAct>
|
||||
<libelle>TEMPS DU MIDI 22/23</libelle>
|
||||
<libelle2>TEMPS DU MIDI</libelle2>
|
||||
</activity>
|
||||
<weeklyCalendar/>
|
||||
<unitScheduleList>
|
||||
<unit>
|
||||
<idUnit>A10049327683</idUnit>
|
||||
<libelle>TEMPS DU MIDI 22/23</libelle>
|
||||
<calendarLetter>X</calendarLetter>
|
||||
</unit>
|
||||
<datePrevMin>2023-05-02T00:00:00+02:00</datePrevMin>
|
||||
<dayInfoList>
|
||||
<day>2023-01-09T00:00:00+01:00</day>
|
||||
<scheduledPresence>0</scheduledPresence>
|
||||
<realPresence>0</realPresence>
|
||||
<ns3:status>WRITABLE</ns3:status>
|
||||
<ns3:action>ADD_PRES_PREVI</ns3:action>
|
||||
</dayInfoList>
|
||||
</unitScheduleList>
|
||||
</activityScheduleList>
|
||||
</personScheduleList>
|
||||
</resultBean>
|
||||
</ns2:getPersonScheduleListResponse>
|
||||
|
|
Loading…
Reference in New Issue