X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/df11677afd55ef592330a05c43ed4baa81b60572..7151fa05e4d4f73956d7f9a7ad2db1f5b956a0c0:/app/models/relation.rb?ds=sidebyside diff --git a/app/models/relation.rb b/app/models/relation.rb index b7cb0f15b..984732c71 100644 --- a/app/models/relation.rb +++ b/app/models/relation.rb @@ -224,6 +224,8 @@ class Relation < ActiveRecord::Base def update_from(new_relation, user) if !new_relation.preconditions_ok? raise OSM::APIPreconditionFailedError.new + elsif new_relation.version != version + raise OSM::APIVersionMismatchError.new(new_relation.version, version) else self.user_id = user.id self.tags = new_relation.tags