citusdata / django-multitenant

Python/Django support for distributed multi-tenant databases like Postgres+Citus
MIT License
710 stars 116 forks source link

Tenant not set when using bulk_create #89

Closed rob101 closed 3 years ago

rob101 commented 3 years ago

Django doesn't call the save() method when using bulk_create; per the docs.

It looks like the TenantModelMixin therefore doesn't set the current tenant on object creation via this method.

It may be worth adding this, or otherwise referring to the exception in the docs.

louiseGrandjonc commented 3 years ago

hi @rob101, I fixed it in the 2.3.1 release. Thank you for creating the issue.