mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-11-18 12:59:24 +00:00
Hack to fix tests not passing. Unclear why the filters are being set to nil.
Both of these changes are needed or it doesn't work.
This commit is contained in:
parent
0b725f5d21
commit
d0e0396528
|
@ -43,4 +43,6 @@ defmodule Pleroma.Upload.Filter do
|
||||||
error
|
error
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def filter(nil, upload), do: filter([], upload)
|
||||||
end
|
end
|
||||||
|
|
|
@ -107,7 +107,7 @@ defmodule Pleroma.DataCase do
|
||||||
def ensure_local_uploader(context) do
|
def ensure_local_uploader(context) do
|
||||||
test_uploader = Map.get(context, :uploader, Pleroma.Uploaders.Local)
|
test_uploader = Map.get(context, :uploader, Pleroma.Uploaders.Local)
|
||||||
uploader = Pleroma.Config.get([Pleroma.Upload, :uploader])
|
uploader = Pleroma.Config.get([Pleroma.Upload, :uploader])
|
||||||
filters = Pleroma.Config.get([Pleroma.Upload, :filters])
|
filters = Pleroma.Config.get([Pleroma.Upload, :filters]) || []
|
||||||
|
|
||||||
Pleroma.Config.put([Pleroma.Upload, :uploader], test_uploader)
|
Pleroma.Config.put([Pleroma.Upload, :uploader], test_uploader)
|
||||||
Pleroma.Config.put([Pleroma.Upload, :filters], [])
|
Pleroma.Config.put([Pleroma.Upload, :filters], [])
|
||||||
|
|
Loading…
Reference in a new issue