Fix for crash on extension blueprints loading

It the extension was registered with url_prefix=None, we set url_prefix to empty string so it can be added to blueprint.url_prefix.
This commit is contained in:
Francesco Siddi 2017-03-12 18:46:08 +01:00
parent 9abdd1ee90
commit 1eb1cd7b64

View File

@ -206,6 +206,9 @@ class PillarServer(Eve):
# Load extension blueprint(s)
for blueprint in pillar_extension.blueprints():
if blueprint.url_prefix:
if not url_prefix:
# If we registered the extension with url_prefix=None
url_prefix = ''
blueprint_prefix = url_prefix + blueprint.url_prefix
else:
blueprint_prefix = url_prefix