8000 improvement: support `allow_nil_input` dsl option in update/destroy (Ash 2 backport) by vonagam · Pull Request #965 · ash-project/ash · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

improvement: support allow_nil_input dsl option in update/destroy (Ash 2 backport) #965

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

vonagam
Copy link
Contributor
@vonagam vonagam commented Apr 1, 2024

Backport of #964 for Ash 2.

The change is almost the same except two things. First, take into account reject (which does not exist in Ash 3). Second, do remove an attribute from being required because it has private?: true - seems like a bug, because private? is not about that.

Edit: Put back private? check. Just to avoid any breaking changes.

@vonagam vonagam force-pushed the feat-allow-nil-input-update-destroy-2 branch from 55f643e to b6fe2ca Compare April 2, 2024 15:13
@zachdaniel
Copy link
Contributor

Yeah, the private? bit there is actually used because we basically do two phases. We check public attributes that are accepted by the action in an earlier step, since the user can't provide them, we know they must be set by the action.

@zachdaniel zachdaniel merged commit 9381bbe into ash-project:2.0 Apr 2, 2024
@vonagam vonagam deleted the feat-allow-nil-input-update-destroy-2 branch April 2, 2024 16:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0