citusdata / django-multitenant

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

With TENANT_STRICT_MODE set you cannot query or bulk create #186

Closed nickittynack closed 1 year ago

nickittynack commented 1 year ago

Hello, this change would cause the library to throw exceptions if TENANT_STRICT_MODE is set to True. Rationale being if there is no tenant you should not be able to query all rows.

Apologies if this is not the intent of TENANT_STRICT_MODE. I can add/fix up appropriate tests, wanted to check if this sort of change would be alright.

nickittynack commented 1 year ago

@microsoft-github-policy-service agree company="GenesisCare"

gurkanindibay commented 1 year ago

@nickittynack Thanks for your contribution ❤️. Could you add test cases to test these code blocks

codecov[bot] commented 1 year ago

Codecov Report

Merging #186 (14b0038) into main (6961f8f) will not change coverage. The diff coverage is n/a.

@@            Coverage Diff            @@
##              main      #186   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           44        44           
  Lines         1193      1193           
=========================================
  Hits          1193      1193           

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

nickittynack commented 1 year ago

Apologies the project driving the need for this library has headed in a different direction for tenancy, so I will close this for now. Thank you for your time

svb0866 commented 1 month ago

Any work around on this?