Skip to content
Snippets Groups Projects
Verified Commit ac83af15 authored by Nik | Klampfradler's avatar Nik | Klampfradler
Browse files

Merge branch '700-3-0-introduce-graphene-graphql' into feature/vuejs

parents 38bab320 92ae6250
No related branches found
No related tags found
1 merge request!1045Introduce Vuetify and GraphQL
Pipeline #79560 failed
......@@ -73,17 +73,17 @@ def get_app_packages(only_official: bool = False) -> Sequence[str]:
def get_app_module(app: str, name: str) -> Optional[ModuleType]:
"""Get the settings module of an app."""
"""Get a named module of an app."""
pkg = ".".join(app.split(".")[:-2])
mod_settings = None
while "." in pkg:
try:
return import_module(f"{app}.{name}")
return import_module(f"{pkg}.{name}")
except ImportError:
# Import errors are non-fatal.
pkg = ".".join(pkg.split(".")[:-1])
# The app does not have settings
# The app does not have this module
return None
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment