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

updated sams_hub.py to pass test_sams_hub.py test_main_app fix issue #12

parent 24f86b7b
Branches
No related tags found
1 merge request!7Resolve "test_main_app sollte auch funktionieren wenn man die die namen test und test.app vertauscht"
...@@ -35,7 +35,7 @@ class SAMSHub: ...@@ -35,7 +35,7 @@ class SAMSHub:
raise TypeError('Argument app has to be a SAMSApp.') raise TypeError('Argument app has to be a SAMSApp.')
self._apps[app.name] = app self._apps[app.name] = app
self._appList.append(app) self._appList.append(app)
if app.name is self._config.get('main_app'): if app.name == self._config.get('main_app'):
self._flaskApp.register_blueprint(app.blueprint) self._flaskApp.register_blueprint(app.blueprint)
else: else:
self._flaskApp.register_blueprint( self._flaskApp.register_blueprint(
...@@ -78,7 +78,7 @@ class SAMSHub: ...@@ -78,7 +78,7 @@ class SAMSHub:
def menu(self, langCode): def menu(self, langCode):
menu = [] menu = []
for app in self._appList: for app in self._appList:
if self._config.get('main_app') is app.name: if self._config.get('main_app') == app.name:
menu.extend(app.menu(langCode = langCode)) menu.extend(app.menu(langCode = langCode))
else: else:
menu.extend(app.menu(langCode = langCode, urlPrefix = app.name)) menu.extend(app.menu(langCode = langCode, urlPrefix = app.name))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment