Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove tenant schema PG_EXTRA_SEARCH_PATHS check #542

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions tenant_schemas/apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,6 @@ def best_practice(app_configs, **kwargs):
"%s can not be included on PG_EXTRA_SEARCH_PATHS."
% get_public_schema_name()))

# make sure no tenant schema is in settings.PG_EXTRA_SEARCH_PATHS
invalid_schemas = set(settings.PG_EXTRA_SEARCH_PATHS).intersection(
get_tenant_model().objects.all().values_list('schema_name', flat=True))
if invalid_schemas:
errors.append(Critical(
"Do not include tenant schemas (%s) on PG_EXTRA_SEARCH_PATHS."
% ", ".join(sorted(invalid_schemas))))

if not settings.SHARED_APPS:
errors.append(
Warning("SHARED_APPS is empty.",
Expand Down