Reuse existing addresses when creating an event

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2019-08-22 15:57:44 +02:00
parent ebf5534003
commit 0e0b68445b
22 changed files with 410 additions and 121 deletions

View File

@@ -15,7 +15,8 @@ defmodule Mobilizon.Addresses.Address do
:region,
:postal_code,
:street,
:url
:url,
:origin_id
]
@required [
:url
@@ -31,6 +32,7 @@ defmodule Mobilizon.Addresses.Address do
field(:postal_code, :string)
field(:street, :string)
field(:url, :string)
field(:origin_id, :string)
has_many(:event, Event, foreign_key: :physical_address_id)
timestamps()