region and place is no longer created twice.

This commit is contained in:
senderfm 2019-06-25 07:43:27 +02:00
parent 49cc012da3
commit 74cbe47485

View File

@ -87,6 +87,9 @@ const createOrUpdateLocations = async (userId, locationName, driver) => {
}
const session = driver.session()
if (data.place_type.length > 1) {
data.id = 'region.' + data.id.split('.')[1]
}
await createLocation(session, data)
let parent = data