applications: skip unknown (lateral) services (#68783)
This commit is contained in:
parent
b739d3cab7
commit
20dcea566c
|
@ -65,6 +65,8 @@ def get_object_types():
|
|||
continue
|
||||
service_objects = {x.get_base_url_path(): x for x in get_installed_services(types=[service_id])}
|
||||
for service in services.values():
|
||||
if service['url'] not in service_objects:
|
||||
continue
|
||||
if service_objects[service['url']].secondary:
|
||||
continue
|
||||
url = urllib.parse.urljoin(service['url'], 'api/export-import/')
|
||||
|
|
|
@ -145,12 +145,19 @@ def test_create_application(app, admin_user, settings):
|
|||
|
||||
settings.KNOWN_SERVICES = {
|
||||
'wcs': {
|
||||
'blah': {
|
||||
# simulate an instance from another collectivity
|
||||
'title': 'Unknown',
|
||||
'url': 'https://unknown.example.invalid/',
|
||||
'orig': 'example.org',
|
||||
'secret': 'xxx',
|
||||
},
|
||||
'foobar': {
|
||||
'title': 'Foobar',
|
||||
'url': 'https://wcs.example.invalid/',
|
||||
'orig': 'example.org',
|
||||
'secret': 'xxx',
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue