From 417f4496f3a2d8505821e68bb66e08838a73d552 Mon Sep 17 00:00:00 2001 From: Jacob Haslehurst Date: Wed, 11 Apr 2018 14:38:45 +1000 Subject: [PATCH] Remove tenant schema PG_EXTRA_SEARCH_PATHS check This is currently making it impossible to perform migrations on a blank database with PG_EXTRA_SEARCH_PATHS set. see issue #450. --- tenant_schemas/apps.py | 8 -------- 1 file changed, 8 deletions(-) diff --git a/tenant_schemas/apps.py b/tenant_schemas/apps.py index 6b16b621..5b3ef50d 100644 --- a/tenant_schemas/apps.py +++ b/tenant_schemas/apps.py @@ -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.",