mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-11-27 08:16:16 +00:00
[Pleroma.Web.MastodonAPI.FilterView] fix expires_at being a unsafe variable
This commit is contained in:
parent
9bddb39ff0
commit
6973b77e94
|
@ -8,11 +8,12 @@ defmodule Pleroma.Web.MastodonAPI.FilterView do
|
||||||
end
|
end
|
||||||
|
|
||||||
def render("filter.json", %{filter: filter}) do
|
def render("filter.json", %{filter: filter}) do
|
||||||
if filter.expires_at do
|
expires_at =
|
||||||
expires_at = Utils.to_masto_date(filter.expires_at)
|
if filter.expires_at do
|
||||||
else
|
Utils.to_masto_date(filter.expires_at)
|
||||||
expires_at = nil
|
else
|
||||||
end
|
nil
|
||||||
|
end
|
||||||
|
|
||||||
%{
|
%{
|
||||||
id: to_string(filter.filter_id),
|
id: to_string(filter.filter_id),
|
||||||
|
|
Loading…
Reference in a new issue