Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion django_multitenant/mixins.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,8 @@ def __init__(self, *args, **kwargs):
def __setattr__(self, attrname, val):
# Provides failing of the save operation if the tenant_id is changed.
# try_update_tenant is being checked inside save method and if it is true, it will raise an exception.
result = super().__setattr__(attrname, val)

def is_val_equal_to_tenant(val):
return (
val
Expand All @@ -140,7 +142,7 @@ def is_val_equal_to_tenant(val):
):
self._try_update_tenant = True

return super().__setattr__(attrname, val)
return result

# pylint: disable=too-many-arguments
def _do_update(self, base_qs, using, pk_val, values, update_fields, forced_update):
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

setup(
name="django-multitenant",
version="4.0.0", # Required
version="4.0.0.1", # Required
description="Django Library to Implement Multi-tenant databases",
long_description=long_description,
long_description_content_type="text/markdown",
Expand Down