Open thetechguyseth opened 1 month ago
Describe the bug
Manage_relationship calls are not satisfying allow_nil? false in AshAdmin
allow_nil? false
OR
an issue assigning an argument / attribute to a relationship's "Attribute Defaults" (without assigning a "source_attribute").
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
{:phoenix, "~> 1.7.12"}, {:phoenix_ecto, "~> 4.4"}, {:ecto_sql, "~> 3.10"}, {:postgrex, ">= 0.0.0"}, {:phoenix_html, "~> 4.0"}, {:phoenix_live_reload, "~> 1.2", only: :dev}, {:phoenix_live_view, "~> 0.20.2"}, {:floki, ">= 0.30.0", only: :test}, {:phoenix_live_dashboard, "~> 0.8.3"}, {:esbuild, "~> 0.8", runtime: Mix.env() == :dev}, {:tailwind, "~> 0.2", runtime: Mix.env() == :dev}, {:heroicons, github: "tailwindlabs/heroicons", tag: "v2.1.1", sparse: "optimized", app: false, compile: false, depth: 1}, {:swoosh, "~> 1.5"}, {:finch, "~> 0.13"}, {:telemetry_metrics, "~> 1.0"}, {:telemetry_poller, "~> 1.0"}, {:gettext, "~> 0.20"}, {:jason, "~> 1.2"}, {:dns_cluster, "~> 0.1.1"}, {:bandit, "~> 1.2"}, {:ash, "~> 3.0"}, {:picosat_elixir, "~> 0.2.3"}, {:ash_postgres, "~> 2.0"}, {:ash_phoenix, "~> 2.0"}, {:ash_admin, "~> 0.11.0"}
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 :)
Describe the bug
Manage_relationship calls are not satisfying
allow_nil? false
in AshAdminOR
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