Ash FrameworkAF
Ash Frameworkโ€ข3y agoโ€ข
8 replies
Robert Graff

Key :editing_tenant not found

Just starting to explore AshAdmin.

  ** (KeyError) key :editing_tenant not found in: %{
  __changed__: %{
    clear_tenant: true,
    flash: true,
    id: true,
    set_tenant: true,
    tenant: true
  },
  __given__: %{
    __changed__: %{
      clear_tenant: true,
      flash: true,
      id: true,
      set_tenant: true,
      tenant: true
    },
    clear_tenant: "clear_tenant",
    flash: %{},
    id: "tenant_editor",
    myself: %Phoenix.LiveComponent.CID{cid: 7},
    set_tenant: "set_tenant",
    socket: #Phoenix.LiveView.Socket<
      id: "phx-F3YXwxGfYHWbADEG",
      endpoint: KickplanWeb.Endpoint,
      view: AshAdmin.PageLive,
      parent_pid: nil,
      root_pid: nil,
      router: KickplanWeb.Router,
      assigns: #Phoenix.LiveView.Socket.AssignsNotInSocket<>,
      transport_pid: nil,
      ...
    >,
    tenant: nil
  },
  clear_tenant: "clear_tenant",
  flash: %{},
  id: "tenant_editor",
  myself: %Phoenix.LiveComponent.CID{cid: 7},
  set_tenant: "set_tenant",
  socket: #Phoenix.LiveView.Socket<
    id: "phx-F3YXwxGfYHWbADEG",
    endpoint: KickplanWeb.Endpoint,
    view: AshAdmin.PageLive,
    parent_pid: nil,
    root_pid: nil,
    router: KickplanWeb.Router,
    assigns: #Phoenix.LiveView.Socket.AssignsNotInSocket<>,
    transport_pid: nil,
    ...
  >,
  tenant: nil
}
        (ash_admin 0.9.0) lib/ash_admin/components/top_nav/tenant_form.ex:13: anonymous fn/2 in AshAdmin.Components.TopNav.TenantForm."render (overridable 1)"/1
        (phoenix_live_view 0.19.5) lib/phoenix_live_view/diff.ex:386: Phoenix.LiveView.Diff.traverse/7
        (phoenix_live_view 0.19.5) lib/phoenix_live_view/diff.ex:711: Phoenix.LiveView.Diff.render_component/9
        (phoenix_live_view 0.19.5) lib/phoenix_live_view/diff.ex:657: anonymous fn/5 in Phoenix.LiveView.Diff.render_pending_components/6
        (elixir 1.15.4) lib/enum.ex:2510: Enum."-reduce/3-lists^foldl/2-0-"/3
        (stdlib 4.3) maps.erl:411: :maps.fold_1/3
        (phoenix_live_view 0.19.5) lib/phoenix_live_view/diff.ex:629: Phoenix.LiveView.Diff.render_pending_components/6
        (phoenix_live_view 0.19.5) lib/phoenix_live_view/diff.ex:143: Phoenix.LiveView.Diff.render/3
        (phoenix_live_view 0.19.5) lib/phoenix_live_view/static.ex:252: Phoenix.LiveView.Static.to_rendered_content_tag/4
        (phoenix_live_view 0.19.5) lib/phoenix_live_view/static.ex:135: Phoenix.LiveView.Static.render/3
        (phoenix_live_view 0.19.5) lib/phoenix_live_view/controller.ex:39: Phoenix.LiveView.Controller.live_render/3
        (phoenix 1.7.7) lib/phoenix/router.ex:430: Phoenix.Router.__call__/5
        (kickplan 0.1.0) lib/kickplan_web/endpoint.ex:1: KickplanWeb.Endpoint.plug_builder_call/2
        (kickplan 0.1.0) deps/plug/lib/plug/debugger.ex:136: KickplanWeb.Endpoint."call (overridable 3)"/2
        (kickplan 0.1.0) lib/kickplan_web/endpoint.ex:1: KickplanWeb.Endpoint.call/2
        (phoenix 1.7.7) lib/phoenix/endpoint/sync_code_reload_plug.ex:22: Phoenix.Endpoint.SyncCodeReloadPlug.do_call/4
        (plug_cowboy 2.6.1) lib/plug/cowboy/handler.ex:11: Plug.Cowboy.Handler.init/2
        (cowboy 2.10.0) /workspace/app/deps/cowboy/src/cowboy_handler.erl:37: :cowboy_handler.execute/2
        (cowboy 2.10.0) /workspace/app/deps/cowboy/src/cowboy_stream_h.erl:306: :cowboy_stream_h.execute/3
        (cowboy 2.10.0) /workspace/app/deps/cowboy/src/cowboy_stream_h.erl:295: :cowboy_stream_h.request_process/3


I'm not sure how AshAdmin interacts with multitenancy. For context, some of my apis are multitenancy but not all of them. The tenant for web is via a url slug. For graphql, it's a header. When admin starts, I'm assuming there won't be a tenant.
Was this page helpful?