[openstreetmap/openstreetmap-website] ActiveRecord::RecordNotUnique error occurs when save . (#1542)

sophia-xll notifications at github.com
Tue May 16 06:52:04 UTC 2017


I have an osm data. Both node and way ids are increasing from 1,so it is with changset. I use postgresql database to store , openstreetmap-website to show, and ID editor to edit. All works well when edit. However, When I try to save , It occurs error:
ActiveRecord::RecordNotUnique: PG::UniqueViolation: ERROR: duplicate key value violates unique constraint "changsets_pkey" DETAIL: Key (id)=(1) already exists. : INSERT INTO "changesets" ("created_at", "user_id") VALUES ($1, $2, $3) RETURNING "id"
Click save button again ,it occurs error:
ActiveRecord::RecordNotUnique: PG::UniqueViolation: ERROR: duplicate key value violates unique constraint "current_nodes_pkey1" DETAIL: Key (id)=(1) already exists. : INSERT INTO "current_nodes" ("latitude", "longitude", "changeset_id", "version", "visible", "timestamp", "tile") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id"
I guess id editor save node,way and changeset using ids increasing from 1. If I am right ,How to edit osm data which ids increasing from 1?

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/1542
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20170515/7725d728/attachment.html>


More information about the rails-dev mailing list