ash-project / ash_admin

A super-admin UI dashboard for Ash Framework applications, built with Phoenix LiveView.
https://hexdocs.pm/ash_admin
MIT License
92 stars 42 forks source link

Manage_relationship calls are not satisfying "allow_nil? false" #168

Open thetechguyseth opened 1 month ago

thetechguyseth commented 1 month ago

Describe the bug

Manage_relationship calls are not satisfying allow_nil? false in AshAdmin

image

OR

an issue assigning an argument / attribute to a relationship's "Attribute Defaults" (without assigning a "source_attribute").

OR

both


To Reproduce

Use the attached Livebook (remove the .txt extension) AshAdminRelationshipIssue.livemd.txt

If I create the changeset by hand everything executes fine. (As seen in the livebook)

Recreate these resources in an ash admin webpage, attempt to add a family_id to a person using the create action.

NOTE: The livebook is running ETS as the data layer but I am using Postgres in the project. ( I can provide the config is needed )


Expected behavior

Adding A family_id when creating a person generates no errors and the 'person' resource is created without issue.

Runtime

zachdaniel commented 1 month ago

Given that there are workarounds for this, I'm going to put this in the "soon" category of the roadmap and mark it as a good first issue :)