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

Filter apps when looping in system check

Improves readability by declaring that this filter is not part of the
system check, but limits the system check to a subset of apps.
parent 60e83cad
No related branches found
No related tags found
1 merge request!164Fix some mistakes in app config system check
......@@ -17,8 +17,8 @@ def check_app_configs_base_class(
if app_configs is None:
app_configs = django.apps.apps.get_app_configs()
for app_config in app_configs:
if app_config.name.startswith("aleksis.apps.") and not isinstance(app_config, AppConfig):
for app_config in filter(lambda c: c.name.startswith("aleksis.apps."), app_configs):
if not isinstance(app_config, AppConfig):
results.append(
Warning(
"App config %s does not derive from aleksis.core.util.apps.AppConfig.",
......
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