]> git.openstreetmap.org Git - rails.git/commitdiff
Patching better 412 error messages from mis-commit on old api06 branch.
authorMatt Amos <zerebubuth@gmail.com>
Fri, 24 Apr 2009 10:08:15 +0000 (10:08 +0000)
committerMatt Amos <zerebubuth@gmail.com>
Fri, 24 Apr 2009 10:08:15 +0000 (10:08 +0000)
1  2 
app/models/relation.rb
app/models/way.rb

index 464d1646cdedbec5523624fbabba614e2c46855b,2032e677046684067287dddb14e0f7eddecf528c..8a211b84f0498888108754c4b2e1bc70032a906c
@@@ -249,8 -249,8 +249,8 @@@ class Relation < ActiveRecord::Bas
  
    def update_from(new_relation, user)
      check_consistency(self, new_relation, user)
-     if !new_relation.preconditions_ok?
-       raise OSM::APIPreconditionFailedError.new
 -    unless preconditions_ok?
++    unless new_relation.preconditions_ok?
+       raise OSM::APIPreconditionFailedError.new("Cannot update relation #{self.id}: data or member data is invalid.")
      end
      self.changeset_id = new_relation.changeset_id
      self.changeset = new_relation.changeset
Simple merge