level =
Feriendaten.Geo.Level
|> Ash.Query.filter(contains(slug, "land"))
|> Feriendaten.Geo.read!()
|> hd()
Feriendaten.Geo.Location
|> Ash.Changeset.for_create(:create, %{
name: "Germany",
code: "DE",
slug: "germany",
level_id: level.id
})
|> Feriendaten.Geo.create!()
level =
Feriendaten.Geo.Level
|> Ash.Query.filter(contains(slug, "land"))
|> Feriendaten.Geo.read!()
|> hd()
Feriendaten.Geo.Location
|> Ash.Changeset.for_create(:create, %{
name: "Germany",
code: "DE",
slug: "germany",
level_id: level.id
})
|> Feriendaten.Geo.create!()