Skip to content
Snippets Groups Projects
Commit a28fbb10 authored by Sebastian Lobinger's avatar Sebastian Lobinger
Browse files

update sams_hub.py addApp to pass all older tests in test_sams_hub.py

parent d6bfbec1
No related branches found
No related tags found
1 merge request!1Resolve "Eine App sollte in SAMSHub als main bestimmt werden können und für URLs kein prefiy erhalten"
......@@ -32,8 +32,12 @@ class SAMSHub:
def addApp(self, app: SAMSApp = None):
if not isinstance(app, SAMSApp):
raise TypeError('Argument app has to be a SAMSApp.')
self._apps[app.name] = app;
self._flaskApp.register_blueprint(app.blueprint)
self._apps[app.name] = app
if app.name is self._config.get('main_app'):
self._flaskApp.register_blueprint(app.blueprint)
else:
self._flaskApp.register_blueprint(
app.blueprint, url_prefix = '/' + app.name)
@property
def appKeys(self):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment