Skip to content

Commit

Permalink
chore: return false instead of error on validate? failing in can?
Browse files Browse the repository at this point in the history
  • Loading branch information
zachdaniel committed Sep 23, 2024
1 parent 1982d66 commit 01e94f4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/ash/can.ex
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ defmodule Ash.Can do
end

if opts[:validate?] && !subject.valid? do
{:error, Ash.Error.to_error_class(subject.errors)}
{:ok, false, Ash.Error.to_error_class(subject.errors)}
else
subject = %{subject | domain: domain}

Expand Down

0 comments on commit 01e94f4

Please sign in to comment.