Signed-off-by: Marc 'risson' Schmitt <marc.schmitt@risson.space>
This commit is contained in:
Marc 'risson' Schmitt 2024-01-11 17:15:34 +01:00
parent 3169599729
commit cec13ce534
No known key found for this signature in database
GPG Key ID: 9C3FA22FABF1AA8D
1 changed files with 4 additions and 1 deletions

View File

@ -58,7 +58,10 @@ class ManagedAppConfig(AppConfig):
self._reconcile(self.RECONCILE_TENANT_PREFIX) self._reconcile(self.RECONCILE_TENANT_PREFIX)
def reconcile_global(self) -> None: def reconcile_global(self) -> None:
"""reconcile ourselves for global methods. Used for signals, tasks, etc. Database queries should not be made in here.""" """
reconcile ourselves for global methods.
Used for signals, tasks, etc. Database queries should not be made in here.
"""
from django_tenants.utils import get_public_schema_name, schema_context from django_tenants.utils import get_public_schema_name, schema_context
with schema_context(get_public_schema_name()): with schema_context(get_public_schema_name()):