Pleroma.Web.ActivityPub.ObjectValidator: dialyzer error

lib/pleroma/web/activity_pub/object_validator.ex:165:pattern_match
The pattern can never match the type.

Pattern:
{:local, _}

Type:

  {:error,
   %Ecto.Changeset{
     :action => atom(),
     :changes => %{atom() => _},
     :constraints => [
       %{
         :constraint =>
           binary()
           | %Regex{
               :opts => binary() | [any()],
               :re_pattern => _,
               :re_version => _,
               :source => binary()
             },
         :error_message => binary(),
         :error_type => atom(),
         :field => atom(),
         :match => :exact | :prefix | :suffix,
         :type => :check | :exclusion | :foreign_key | :unique
       }
     ],
     :data => nil | map(),
     :empty_values => _,
     :errors => Keyword.t({binary(), Keyword.t()}),
     :filters => %{atom() => _},
     :params => nil | %{binary() => _},
     :prepare => [(_ -> any())],
     :repo => atom(),
     :repo_opts => Keyword.t(),
     :required => [atom()],
     :types =>
       nil
       | %{
           atom() =>
             atom()
             | {:array | :assoc | :embed | :in | :map | :maybe | :param, _}
             | {:parameterized, atom(), _}
         },
     :valid? => boolean(),
     :validations => Keyword.t()
   }}
This commit is contained in:
Mark Felder 2024-01-27 14:29:48 -05:00
parent 5c08153fc5
commit 94d7e28cbe
1 changed files with 3 additions and 0 deletions

View File

@ -173,6 +173,9 @@ def validate(
{:object_validation, e} ->
e
{:error, %Ecto.Changeset{} = e} ->
{:error, e}
end
end