You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I noticed it while testing stuff in ash_admin but I believe the root cause is here.
When destroying a record via ash_admin, the following error is raised:
** (UndefinedFunctionError) function :ok.resource/0 is undefined (module :ok is not available)
:ok.resource()
(ash 1.52.0-rc.8) lib/ash/api/api.ex:987: Ash.Api.update/3
(my_app 0.1.0) lib/my_app/ash/api.ex:1: MyApp.Api.update/2
(ash_phoenix 0.7.2-rc.0) lib/ash_phoenix/form/form.ex:1160: AshPhoenix.Form.with_changeset/2
(ash_phoenix 0.7.2-rc.0) lib/ash_phoenix/form/form.ex:1076: AshPhoenix.Form.submit/2
(ash_admin 0.4.4) lib/ash_admin/components/resource/form.ex:1083: AshAdmin.Components.Resource.Form.handle_event/3
Looking at that line of ash_phoenix, it looks like it's trying to call an update function after a destroy? Which was introduced as part of this commit:
I'm not sure how to trigger it outside ash_admin. But within ash_admin, triggering a Destroy action will cause it.
Expected behavior
The action does actually delete the record, but the LV crashes and so the app is left on a white screen - this shouldn't happen, it should go back to the default read action or schema or something with a flash message. Whatever it did before the bug was introduced!
** Runtime
Elixir version - 1.13.3
Erlang version - 24.3
OS - macOS Monterey
Ash/AshPhoenix/AshAdmin version - current main
The text was updated successfully, but these errors were encountered:
Describe the bug
I noticed it while testing stuff in ash_admin but I believe the root cause is here.
When destroying a record via ash_admin, the following error is raised:
Looking at that line of ash_phoenix, it looks like it's trying to call an update function after a destroy? Which was introduced as part of this commit:
50f6a10#diff-9cf68247dcbdd870091032f2ed3c7f1ac6ee87d1dfb2051658c4e61cab2fe3efR1074
Should this line have been added?
To Reproduce
I'm not sure how to trigger it outside ash_admin. But within ash_admin, triggering a Destroy action will cause it.
Expected behavior
The action does actually delete the record, but the LV crashes and so the app is left on a white screen - this shouldn't happen, it should go back to the default read action or schema or something with a flash message. Whatever it did before the bug was introduced!
** Runtime
The text was updated successfully, but these errors were encountered: