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

@@@ -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