[Pleroma.Web.MastodonAPI.FilterView] fix expires_at being a unsafe variable

This commit is contained in:
Haelwenn (lanodan) Monnier 2018-08-21 20:35:14 +02:00
parent 9bddb39ff0
commit 6973b77e94
No known key found for this signature in database
GPG key ID: D5B7A8E43C997DEE

View file

@ -8,10 +8,11 @@ defmodule Pleroma.Web.MastodonAPI.FilterView do
end
def render("filter.json", %{filter: filter}) do
expires_at =
if filter.expires_at do
expires_at = Utils.to_masto_date(filter.expires_at)
Utils.to_masto_date(filter.expires_at)
else
expires_at = nil
nil
end
%{