Verified Commit 9446b02b authored by Haelwenn's avatar Haelwenn
Browse files

transmogrifier: Just make attachement maps into a list and reroll

parent e53da692
......@@ -159,12 +159,8 @@ def fix_attachments(%{"attachment" => attachment} = object) when is_list(attachm
end
def fix_attachments(%{"attachment" => attachment} = object) when is_map(attachment) do
attachment =
Map.put(attachment, "url", [
%{"type" => "Link", "mediaType" => attachment["mediaType"], "href" => attachment["url"]}
])
Map.put(object, "attachment", attachment)
Map.put(object, "attachment", [attachment])
|> fix_attachments()
end
def fix_attachments(object), do: object
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment