Skip to content

Commit

Permalink
Add check for INSTALLED_APPS not in SHARED_APPS or TENANT_APPS
Browse files Browse the repository at this point in the history
  • Loading branch information
goodtune committed Feb 24, 2017
1 parent a9c17e7 commit 9c3d674
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tenant_schemas/apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,14 @@ def best_practice(app_configs, **kwargs):
Error("You have SHARED_APPS that are not in INSTALLED_APPS",
hint=[a for a in settings.SHARED_APPS if a in delta]))

installed_not_shared_or_tenant = set(INSTALLED_APPS).difference(
set(settings.SHARED_APPS).union(settings.TENANT_APPS))
if installed_not_shared_or_tenant:
errors.append(
Error("You have INSTALLED_APPS that are not in either of "
"TENANT_APPS or SHARED_APPS",
hint=sorted(installed_not_shared_or_tenant)))

if not isinstance(default_storage, TenantStorageMixin):
errors.append(Warning(
"Your default storage engine is not tenant aware.",
Expand Down

0 comments on commit 9c3d674

Please sign in to comment.