Skip to content

Commit

Permalink
Update page_view.ex
Browse files Browse the repository at this point in the history
The check in cond was correct. The fix is to set observable_type_id_map to nil if there is no `observable` object defined in the schema.

Signed-off-by: Rick Mouritzen <[email protected]>
  • Loading branch information
rmouritzen-splunk authored Sep 19, 2024
1 parent 0494e62 commit eca0c31
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/schema_web/views/page_view.ex
Original file line number Diff line number Diff line change
Expand Up @@ -142,11 +142,11 @@ defmodule SchemaWeb.PageView do
if observable_object do
observable_object[:attributes][:type_id][:enum]
else
{nil, nil}
nil
end

cond do
observable_type_id_map in [nil, {nil, nil}] ->
observable_type_id_map == nil ->
{nil, nil}

Map.has_key?(entity, :observable) ->
Expand Down

0 comments on commit eca0c31

Please sign in to comment.