ash-project / ash

A declarative, extensible framework for building Elixir applications.
https://www.ash-hq.org
MIT License
1.63k stars 218 forks source link

bulk_create does not respect multitenancy #1560

Closed revati closed 3 weeks ago

revati commented 3 weeks ago

Describe the bug bulk_create does not respect multitenancy

To Reproduce Resource needs to have

multitenancy do strategy :attribute attribute :organization_id end

Try to bulk create Ash.bulk_create!(entries, MODULE, :action, return_errors?: true) If other rules are ok, it will create entries, without organization_id field value.

Expected behavior Throw error, if no tenant is provided.

Runtime

Additional context Add any other context about the problem here.