Skip to content

Commit 52ac513

Browse files
authored
fix: use Resource.admin.show_action (#359)
1 parent 014f8d4 commit 52ac513

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

lib/ash_admin/pages/page_live.ex

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -272,16 +272,15 @@ defmodule AshAdmin.PageLive do
272272
socket.assigns.actor
273273
end
274274

275-
primary_read_action =
276-
Ash.Resource.Info.primary_action(socket.assigns.resource, :read) ||
277-
AshAdmin.Helpers.primary_action(socket.assigns.resource, :read)
275+
show_action =
276+
AshAdmin.Resource.show_action(socket.assigns.resource)
278277

279278
record =
280279
socket.assigns.resource
281280
|> Ash.Query.filter(^primary_key)
282281
|> Ash.Query.set_tenant(socket.assigns[:tenant])
283282
|> Ash.Query.for_read(
284-
primary_read_action.name,
283+
show_action,
285284
%{},
286285
actor: actor,
287286
authorize?: socket.assigns.authorizing

0 commit comments

Comments
 (0)