accrete 0.0.77__py3-none-any.whl → 0.0.78__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/models.py CHANGED
@@ -25,9 +25,9 @@ class TenantModel(models.Model, AnnotationModelMixin):
25
25
  ):
26
26
 
27
27
  tenant = get_tenant()
28
- if tenant is not None and self.tenant != tenant:
28
+ if self.pk and tenant is not None and self.tenant != tenant:
29
29
  raise ValueError('Current tenant differs from tenant of the record!')
30
- self.tenant = self.tenant or tenant
30
+ self.tenant = tenant
31
31
  super().save(
32
32
  force_insert=force_insert,
33
33
  force_update=force_update,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: accrete
3
- Version: 0.0.77
3
+ Version: 0.0.78
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
@@ -6,7 +6,7 @@ accrete/config.py,sha256=eJUbvyBO3DvAD6xkVKjTAzlXy7V7EK9bVyb91girfUs,299
6
6
  accrete/forms.py,sha256=2vUh80qNvPDD8Zl3agKBSJEQeY7bXVLOx_SAB34wf8E,1359
7
7
  accrete/managers.py,sha256=CaIJLeBry4NYIXaVUrdUjp7zx4sEWgv-1-ssI1m-EOs,1156
8
8
  accrete/middleware.py,sha256=IABs2pAV-kXjp3n5_Wsc7reXGjU5FhmCbvFB8cC4ZRM,3422
9
- accrete/models.py,sha256=grvRNXg0ZYAJU3KAIX-svuZXeXlfqP4qEJ00nlbV594,5145
9
+ accrete/models.py,sha256=fiTeM7oaKz38u9egTRtWuexMhzcKhqKbaIFh6A6Jz3w,5142
10
10
  accrete/storage.py,sha256=z7pHdQFw0hFGrrbfqIh7KFxabQ_JGqoPebmiX9TLmeU,1254
11
11
  accrete/tenant.py,sha256=g3ZuTrQr2zqmIopNBRQeCmHEK2R3dlUme_hOV765J6U,1778
12
12
  accrete/tests.py,sha256=Agltbzwwh5htvq_Qi9vqvxutzmg_GwgPS_N19xJZRlw,7197
@@ -221,7 +221,7 @@ accrete/utils/dates.py,sha256=apM6kt6JhGrKgoT0jfav1W-8AUVTxNc9xt3fJQ2n0JI,1492
221
221
  accrete/utils/forms.py,sha256=Lll-DvAhKZDw72XeuCtb4wxQEJNFp7lQWh_Z1GyH3Zk,3049
222
222
  accrete/utils/http.py,sha256=mAtQRgADv7zu1_j7A-EKVyb-oqa5a21i4Gd0QfjzGV0,3540
223
223
  accrete/utils/models.py,sha256=EEhv7-sQVtQD24PEb3XcDUAh3VVhVFoMMLyFrDjGEaI,706
224
- accrete-0.0.77.dist-info/METADATA,sha256=5WK5qeJEnQ6axXO7JkKbCbSWpyURJ5kTfoLkVE_72M0,4892
225
- accrete-0.0.77.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
226
- accrete-0.0.77.dist-info/licenses/LICENSE,sha256=_7laeMIHnsd3Y2vJEXDYXq_PEXxIcjgJsGt8UIKTRWc,1057
227
- accrete-0.0.77.dist-info/RECORD,,
224
+ accrete-0.0.78.dist-info/METADATA,sha256=esUu2SvV0VzrRo9zvqg88a4Q1Xw_q7LsJSG7fkzvcnM,4892
225
+ accrete-0.0.78.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
226
+ accrete-0.0.78.dist-info/licenses/LICENSE,sha256=_7laeMIHnsd3Y2vJEXDYXq_PEXxIcjgJsGt8UIKTRWc,1057
227
+ accrete-0.0.78.dist-info/RECORD,,