Skip to content

Commit

Permalink
Merge pull request #141 from ueberauth/add-stale-error-field-back
Browse files Browse the repository at this point in the history
handle stale ecto errors on delete back
  • Loading branch information
yordis authored Sep 11, 2023
2 parents e8d2f15 + b846c0b commit 58e928e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/guardian/db/ecto_adapter.ex
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ defmodule Guardian.DB.EctoAdapter do
prefix = Keyword.get(opts, :prefix, nil)
repo = Keyword.get(opts, :repo)

repo.delete(record, prefix: prefix)
repo.delete(record, prefix: prefix, stale_error_field: :stale_token)
end

@impl true
Expand Down
2 changes: 2 additions & 0 deletions lib/guardian/db/ets_adapter.ex
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ defmodule Guardian.DB.ETSAdapter do
Please ensure you've created the table before attempting to delete records.
"""
end

{:ok, token}
end

@impl true
Expand Down

0 comments on commit 58e928e

Please sign in to comment.