Trim addresses when exporting them

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel 2021-04-19 12:41:40 +02:00
parent 3df80b96aa
commit 16d192db24
No known key found for this signature in database
GPG key ID: A061B9DDE0CA0773

View file

@ -83,8 +83,10 @@ defmodule Mobilizon.Addresses.Address do
def representation(nil), do: nil def representation(nil), do: nil
def representation(%__MODULE__{} = address) do def representation(%__MODULE__{} = address) do
String.trim(
"#{address.street} #{address.postal_code} #{address.locality} #{address.region} #{ "#{address.street} #{address.postal_code} #{address.locality} #{address.region} #{
address.country address.country
}" }"
)
end end
end end