Skip to content
This repository has been archived by the owner on Jul 24, 2021. It is now read-only.

Attempt to remove all members from a relation is silently ignored #4471

Closed
openstreetmap-trac opened this issue Jul 23, 2021 · 1 comment
Closed

Comments

@openstreetmap-trac
Copy link

Reporter: woodpeck
[Submitted to the original trac issue database at 11.33am, Tuesday, 3rd July 2012]

An attempt to remove all members from a relation (by uploading a new version with no members) results in no change - the relation will be updated with a new version and new user/last modification data, but it will still have all its members.

Simple test case (modify object/changeset IDs accordingly):

<osmChange version="0.6">
  <create>
    <node id="-1" lat="45.0809152" lon="-87.6450209" changeset="zzz" visible="true" timestamp="2012-05-10T23:28:27Z" version="1"/>
    <relation id="-2" visible="true" timestamp="2012-05-12T23:47:18Z" version="1" changeset="zzz">
      <member type="node" ref="-1" role="x"/>
    </relation>
  </create>
</osmChange>

later

<osmChange version="0.6">
  <modify>
    <relation id="xxx" visible="true" timestamp="2012-05-12T23:47:18Z" version="1" changeset="zzz" />
  </modify>
</osmChange>

this results in

<diffResult version="0.6" generator="OpenStreetMap server">
  <relation old_id="xxx" new_id="xxx" new_version="2"/>
</diffResult>

but the relation is unchanged!

It is possible that the bug is related to the "unless members" https://github.com/openstreetmap/openstreetmap-website/blob/master/app/models/relation.rb#L164 but I cannot say for sure.

The bug can be circumvented by deleting a relation (which will clear the member list) and then undeleting it through a .

Relations without members should be allowed even though their uses are probably niche cases.

@openstreetmap-trac
Copy link
Author

Author: TomH
[Added to the original trac issue at 8.22am, Friday, 21st September 2012]

Matt has fixed this in commit 8523f530990932.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant