Verified Commit 6973b77e authored by Haelwenn's avatar Haelwenn

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

parent 9bddb39f
......@@ -8,11 +8,12 @@ defmodule Pleroma.Web.MastodonAPI.FilterView do
end
def render("filter.json", %{filter: filter}) do
if filter.expires_at do
expires_at = Utils.to_masto_date(filter.expires_at)
else
expires_at = nil
end
expires_at =
if filter.expires_at do
Utils.to_masto_date(filter.expires_at)
else
nil
end
%{
id: to_string(filter.filter_id),
......
Markdown is supported
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