fix(backend): avoid duplicating locality and region if they are the same
An example is Paris where both locality and region are named "Paris" Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
parent
1441d35e0b
commit
5de22f91e2
|
@ -85,7 +85,7 @@ defmodule Mobilizon.Service.Address do
|
|||
defined?(street) ->
|
||||
if defined?(locality), do: "#{street} (#{locality})", else: street
|
||||
|
||||
defined?(locality) ->
|
||||
defined?(locality) and locality != region ->
|
||||
"#{locality}, #{region}, #{country}"
|
||||
|
||||
defined?(region) ->
|
||||
|
|
Loading…
Reference in a new issue