toulouse-maelis: use text as key for service criteria in catalog (#78308) #275
|
@ -2725,7 +2725,7 @@ class ToulouseMaelis(BaseResource, HTTPResource):
|
|||
add_criteria('nature', activity_nature['code'], activity_nature['libelle'])
|
||||
type_value = activity_type['libelle'].split('-')[0].strip()
|
||||
add_criteria('type', slugify(type_value), type_value)
|
||||
add_criteria('service', service_id, service_text)
|
||||
add_criteria('service', slugify(service_text), service_text)
|
||||
|
||||
if activity['activityPortail']['weeklyCalendarActivityList']:
|
||||
for day in activity['activityPortail']['weeklyCalendarActivityList'][0]['dayWeekInfoList']:
|
||||
|
|
|
@ -6082,8 +6082,8 @@ def test_read_activity_list(activity_service, con, app):
|
|||
'criterias': {
|
||||
'service': {
|
||||
'text': 'Service',
|
||||
'data': {'A10049329051': 'Sorties'},
|
||||
'order': ['A10049329051'],
|
||||
'data': {'sorties': 'Sorties'},
|
||||
'order': ['sorties'],
|
||||
},
|
||||
'nature': {'text': "Nature de l'activité", 'data': {'4': 'ART PLASTIQUE'}, 'order': ['4']},
|
||||
'type': {
|
||||
|
@ -6114,7 +6114,7 @@ def test_read_activity_list(activity_service, con, app):
|
|||
assert resp.json['meta'] == {
|
||||
'reference_year': 2022,
|
||||
'all_criterias': {
|
||||
'service': {'text': 'Service', 'data': {'A10049329051': 'Sorties'}, 'order': ['A10049329051']},
|
||||
'service': {'text': 'Service', 'data': {'sorties': 'Sorties'}, 'order': ['sorties']},
|
||||
'nature': {
|
||||
'text': "Nature de l'activité",
|
||||
'data': {'4': 'ART PLASTIQUE', '1': 'Activités Régulières'},
|
||||
|
|
Loading…
Reference in New Issue