accrete 0.0.95__py3-none-any.whl → 0.0.96__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
accrete/middleware.py CHANGED
@@ -1,7 +1,7 @@
1
1
  from django.utils.deprecation import MiddlewareMixin
2
2
  from django.conf import settings
3
3
  from django.http.response import HttpResponseRedirect, HttpResponsePermanentRedirect
4
- from accrete.tenant import set_tenant, set_member
4
+ from accrete.tenant import set_tenant, set_member, unscoped
5
5
 
6
6
  from .models import Tenant
7
7
 
@@ -35,10 +35,11 @@ class TenantMiddleware(MiddlewareMixin):
35
35
  return
36
36
 
37
37
  if request.user.is_authenticated:
38
- memberships = request.user.memberships.filter(
39
- is_active=True,
40
- tenant__is_active=True
41
- )
38
+ with unscoped():
39
+ memberships = request.user.memberships.filter(
40
+ is_active=True,
41
+ tenant__is_active=True
42
+ )
42
43
 
43
44
  if request.user.is_staff:
44
45
  tenant_id = self.get_tenant_id_from_request(request)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: accrete
3
- Version: 0.0.95
3
+ Version: 0.0.96
4
4
  Summary: Django Shared Schema Multi Tenant
5
5
  Author-email: Benedikt Jilek <benedikt.jilek@pm.me>
6
6
  License: Copyright (c) 2023 Benedikt Jilek
@@ -5,7 +5,7 @@ accrete/apps.py,sha256=F7ynMLHJr_6bRujWtZVUzCliY2CGKiDvyUmL4F68L2E,146
5
5
  accrete/config.py,sha256=eJUbvyBO3DvAD6xkVKjTAzlXy7V7EK9bVyb91girfUs,299
6
6
  accrete/forms.py,sha256=2vUh80qNvPDD8Zl3agKBSJEQeY7bXVLOx_SAB34wf8E,1359
7
7
  accrete/managers.py,sha256=vODaKmWPvgfRoYXbQ_JD-pRjd2QWM_a9Gjkllrua0WE,1164
8
- accrete/middleware.py,sha256=IABs2pAV-kXjp3n5_Wsc7reXGjU5FhmCbvFB8cC4ZRM,3422
8
+ accrete/middleware.py,sha256=NhtT3YPq0EynAi4F81LLLUZd5rsWDjGVn1tkgUObT3M,3477
9
9
  accrete/models.py,sha256=xliEVR0XPW46ZDJn3-F46s54tG9dxz7BVLbkq1pC144,5434
10
10
  accrete/storage.py,sha256=z7pHdQFw0hFGrrbfqIh7KFxabQ_JGqoPebmiX9TLmeU,1254
11
11
  accrete/tenant.py,sha256=g3ZuTrQr2zqmIopNBRQeCmHEK2R3dlUme_hOV765J6U,1778
@@ -232,7 +232,7 @@ accrete/utils/dates.py,sha256=apM6kt6JhGrKgoT0jfav1W-8AUVTxNc9xt3fJQ2n0JI,1492
232
232
  accrete/utils/forms.py,sha256=IvxbXNpSd4a-JBgsTJhs2GHe-DCRWX-xnVPRcoiCzbI,3104
233
233
  accrete/utils/models.py,sha256=EEhv7-sQVtQD24PEb3XcDUAh3VVhVFoMMLyFrDjGEaI,706
234
234
  accrete/utils/views.py,sha256=iWZSYbd3qYMrV9wAsX26ofGb5wxn1N_nRrQ6s2lpp2I,4557
235
- accrete-0.0.95.dist-info/METADATA,sha256=04_9uE3qFheep7VKhxNoICWn5DlajVnm58iMv-e5Nhk,4952
236
- accrete-0.0.95.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
237
- accrete-0.0.95.dist-info/licenses/LICENSE,sha256=_7laeMIHnsd3Y2vJEXDYXq_PEXxIcjgJsGt8UIKTRWc,1057
238
- accrete-0.0.95.dist-info/RECORD,,
235
+ accrete-0.0.96.dist-info/METADATA,sha256=Cx1L2Ou3g8--jia4Wj_pSod1YvXufxA-vh9YdbjzMHw,4952
236
+ accrete-0.0.96.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
237
+ accrete-0.0.96.dist-info/licenses/LICENSE,sha256=_7laeMIHnsd3Y2vJEXDYXq_PEXxIcjgJsGt8UIKTRWc,1057
238
+ accrete-0.0.96.dist-info/RECORD,,