Open KrYpTeD974 opened 1 year ago
Same issue, different error:
ValueError: Model_many_to_many_field is not an instance or a subclass of TenantModel or does not inherit from TenantMixin
Looks like this caused due the fact that "through" Model_many_to_many_field
table was created behind the scenes by Django, so it is non tenant model.
models.py
class Model(TenantModel):
...
many_to_many_field = models.ManyToManyField("OtherModel")
Same here, have to downgrade to 3.0 which is working fine
Hey @KrYpTeD974 @denys-chura @tuannguyen-groove I fixed the issue. Just waiting for the review. I will publish a new release after approval PR is https://github.com/citusdata/django-multitenant/pull/165 Thanks for using the extension and reporting the issues
Thank you for fixing this so quickly ! I have tested the PR on the +1600 tests of my project, and it seems to work great !
Thanks @KrYpTeD974 for your quick response and tests. With your support, I hope we will make django_multitenant more stable
It seems that having a ManyToMany field between the TenantModel class and a Non Tenant model results in a crash when trying to add items in the collection. This easily reproductible from a fresh Django install:
models.py
test.py
The error is :
I don't think the link table betweek User and Tenant should have a tenant_field.