Pleroma.Migrators.Support.BaseMigrator: Fix dialyzer errors
lib/pleroma/migrators/context_objects_deletion_migrator.ex:13:exact_eq The test :error | float() == 0 can never evaluate to 'true'. lib/pleroma/migrators/hashtags_table_migrator.ex:13:exact_eq The test :error | float() == 0 can never evaluate to 'true'.
This commit is contained in:
parent
6ce7011a2e
commit
a7fa6f18dc
|
@ -188,10 +188,11 @@ defp update_status(status, message \\ nil) do
|
||||||
end
|
end
|
||||||
|
|
||||||
defp fault_rate do
|
defp fault_rate do
|
||||||
with failures_count when is_integer(failures_count) <- failures_count() do
|
with failures_count when is_integer(failures_count) <- failures_count(),
|
||||||
|
true <- failures_count > 0 do
|
||||||
failures_count / Enum.max([get_stat(:affected_count, 0), 1])
|
failures_count / Enum.max([get_stat(:affected_count, 0), 1])
|
||||||
else
|
else
|
||||||
_ -> :error
|
_ -> 0
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue