diff --git a/lib/lightning_web/channels/attempt_json.ex b/lib/lightning_web/channels/attempt_json.ex index 445aac8e56..5539686374 100644 --- a/lib/lightning_web/channels/attempt_json.ex +++ b/lib/lightning_web/channels/attempt_json.ex @@ -1,6 +1,11 @@ defmodule LightningWeb.AttemptJson do + @moduledoc false + + alias Lightning.AdaptorRegistry alias Lightning.Attempt - alias Lightning.Workflows.{Trigger, Edge, Job} + alias Lightning.Workflows.Edge + alias Lightning.Workflows.Job + alias Lightning.Workflows.Trigger def render(%Attempt{} = attempt) do %{ @@ -23,7 +28,7 @@ defmodule LightningWeb.AttemptJson do def render(%Job{} = job) do %{ "id" => job.id, - "adaptor" => job.adaptor, + "adaptor" => AdaptorRegistry.resolve_adaptor(job.adaptor), "credential_id" => get_credential_id(job), "body" => job.body, "name" => job.name diff --git a/test/lightning_web/channels/attempt_channel_test.exs b/test/lightning_web/channels/attempt_channel_test.exs index 2c0a2ddb8e..dc333a7694 100644 --- a/test/lightning_web/channels/attempt_channel_test.exs +++ b/test/lightning_web/channels/attempt_channel_test.exs @@ -214,7 +214,7 @@ defmodule LightningWeb.AttemptChannelTest do "name" => job.name, "body" => job.body, "credential_id" => credential.id, - "adaptor" => job.adaptor + "adaptor" => "@openfn/language-common@1.6.2" } ]