Fix resource preview crash when resource has no image_remote_url
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
parent
7bb8568504
commit
6c6ae7c712
@ -287,7 +287,8 @@ defmodule Mobilizon.Service.RichMedia.Parser do
|
||||
end
|
||||
|
||||
@spec check_remote_picture_path(map()) :: map()
|
||||
defp check_remote_picture_path(%{image_remote_url: image_remote_url, url: url} = data) do
|
||||
defp check_remote_picture_path(%{image_remote_url: image_remote_url, url: url} = data)
|
||||
when is_binary(image_remote_url) and is_binary(url) do
|
||||
Logger.debug("Checking image_remote_url #{image_remote_url}")
|
||||
|
||||
data = Map.put(data, :image_remote_url, format_url(url, image_remote_url))
|
||||
|
Loading…
Reference in New Issue
Block a user