We should either do that insert after the changeset upload suceeds, or wrap everything in a single postgres transaction. Currently, if there is an error with the changeset upload, the data will already exist in field_data_geometries, preventing attempts at re-upload.
Currently, we perform the
insert
into thefield_data_geometries
table before creating and committing the changeset for the ways that need to be added as part of the import, here: https://github.com/orma/openroads-vn-api/blob/master/routes/rlp.js#L61We should either do that
insert
after the changeset upload suceeds, or wrap everything in a single postgres transaction. Currently, if there is an error with the changeset upload, the data will already exist infield_data_geometries
, preventing attempts at re-upload.cc @geohacker