performance: improvedd ash querying
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
carla 2025-12-01 09:48:29 +01:00
parent 2284cd93c4
commit b584581114
3 changed files with 34 additions and 49 deletions

View file

@ -45,16 +45,12 @@ defmodule MvWeb.MemberLive.Index.Formatter do
end
# Format value based on type
defp format_value_by_type(value, :string, _) when is_binary(value) do
# Return empty string if value is empty, otherwise return the value
if String.trim(value) == "", do: "", else: value
end
defp format_value_by_type(value, :string, _), do: to_string(value)
defp format_value_by_type(value, :integer, _), do: to_string(value)
defp format_value_by_type(value, :email, _) when is_binary(value) do
defp format_value_by_type(value, type, _) when type in [:string, :email] and is_binary(value) do
# Return empty string if value is empty
if String.trim(value) == "", do: "", else: value
end