Allow empty sub_paths

This commit is contained in:
Joshua Boniface 2021-06-09 01:54:29 -04:00
parent ae269bdfde
commit 0a04adf8f9
1 changed files with 2 additions and 0 deletions

View File

@ -551,6 +551,8 @@ class ZKSchema(object):
else: else:
base_path = self.schema.get('base').get(itype) base_path = self.schema.get('base').get(itype)
sub_path = self.schema.get(itype).get('.'.join(ipath)) sub_path = self.schema.get(itype).get('.'.join(ipath))
if sub_path is None:
sub_path = ''
return f'{base_path}/{item}{sub_path}' return f'{base_path}/{item}{sub_path}'
# Get keys of a schema location # Get keys of a schema location