Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SynchronousOnlyOperation: You cannot call this from an async context - use a thread or sync_to_async.
- File "django/core/handlers/exception.py", line 47, in inner
- response = get_response(request)
- File "django/utils/deprecation.py", line 116, in __call__
- response = self.process_request(request)
- File "helpers/tenant.py", line 33, in process_request
- tenant = self.get_tenant(domain_model, hostname)
- File "django_tenants/middleware/main.py", line 27, in get_tenant
- domain = domain_model.objects.select_related('tenant').get(domain=hostname)
- File "django/db/models/query.py", line 431, in get
- num = len(clone)
- File "django/db/models/query.py", line 262, in __len__
- self._fetch_all()
- File "django/db/models/query.py", line 1324, in _fetch_all
- self._result_cache = list(self._iterable_class(self))
- File "django/db/models/query.py", line 51, in __iter__
- results = compiler.execute_sql(chunked_fetch=self.chunked_fetch, chunk_size=self.chunk_size)
- File "django/db/models/sql/compiler.py", line 1173, in execute_sql
- cursor = self.connection.cursor()
- File "django/utils/asyncio.py", line 24, in inner
- raise SynchronousOnlyOperation(message)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement