Skip to content

Commit

Permalink
chore: inspect instead of to_string for non-atom calc names
Browse files Browse the repository at this point in the history
  • Loading branch information
zachdaniel committed Sep 19, 2024
1 parent bfcaa07 commit 82e8552
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/ash/actions/read/calculations.ex
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,7 @@ defmodule Ash.Actions.Read.Calculations do
if is_atom(calculation_name) do
to_string(calculation_name)
else
String.replace(to_string(calculation_name), ~r/[^a-zA-Z0-9_\-?]/, "")
String.replace(inspect(calculation_name), ~r/[^a-zA-Z0-9_\-?]/, "")
end

"#{short_name}:calculation:#{calculation_name}"
Expand All @@ -501,7 +501,7 @@ defmodule Ash.Actions.Read.Calculations do
if is_atom(calculation_name) do
to_string(calculation_name)
else
String.replace(to_string(calculation_name), ~r/[^a-zA-Z0-9_\-?]/, "")
String.replace(inspect(calculation_name), ~r/[^a-zA-Z0-9_\-?]/, "")
end

%{
Expand Down

0 comments on commit 82e8552

Please sign in to comment.