in an `after_action` `changeset.context` has no tenant?

So when you have something like:
def change(changeset, _opts, context) do
Ash.Changeset.after_action(changeset, fn changeset, record ->
def change(changeset, _opts, context) do
Ash.Changeset.after_action(changeset, fn changeset, record ->
The context from the change has an actor, tenant, authorize? and some other attributes. But then in the changeset.context it is only the actor. Is there a specific reason for this?
Solution:
THey just aren't the same objects really
Jump to solution
3 Replies
Solution
ZachDaniel
ZachDaniel2mo ago
THey just aren't the same objects really
ZachDaniel
ZachDaniel2mo ago
changeset.context should be used to pull out things you've put into the context the context argument contains a consistent set of information about the callback invocation
jeroen11dijk
jeroen11dijkOP2mo ago
yeah I assumed it wasnt a bug but thanks for the explanation!

Did you find this page helpful?