fix split call to handle apis of the format a/b/c

This commit is contained in:
dbasunag 2023-07-31 09:44:38 -04:00
parent a6f58bda23
commit 6875510e78

View File

@ -170,7 +170,7 @@ class Discoverer(object):
resources_raw = list(filter(lambda resource: '/' not in resource['name'], resources_response))
subresources_raw = list(filter(lambda resource: '/' in resource['name'], resources_response))
for subresource in subresources_raw:
resource, name = subresource['name'].split('/')
resource, name = subresource['name'].split('/', 1)
if not subresources.get(resource):
subresources[resource] = {}
subresources[resource][name] = subresource