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:
@@ -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) ->
|
||||
|
||||
Reference in New Issue
Block a user