Opened 8 years ago

Closed 8 years ago

#4471 closed defect (fixed)

Attempt to remove all members from a relation is silently ignored

Reported by: woodpeck Owned by: rails-dev@…
Priority: minor Milestone:
Component: api Version:
Keywords: Cc:


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">
    <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"/>


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

this results in

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

but the relation is unchanged!

It is possible that the bug is related to the "unless @members" 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 <modify>.

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

Change History (1)

comment:1 Changed 8 years ago by Tom Hughes

Resolution: fixed
Status: newclosed

Matt has fixed this in commit 8523f530990932.

Note: See TracTickets for help on using tickets.