]> git.openstreetmap.org Git - rails.git/blobdiff - app/models/relation.rb
Merge branch 'pull/5734'
[rails.git] / app / models / relation.rb
index f09647320004f99dc1734964a3e265ffb97b272e..0742976e8d125c937eea66afcb4bfe787f90dcc3 100644 (file)
@@ -2,11 +2,11 @@
 #
 # Table name: current_relations
 #
-#  id           :bigint(8)        not null, primary key
-#  changeset_id :bigint(8)        not null
+#  id           :bigint           not null, primary key
+#  changeset_id :bigint           not null
 #  timestamp    :datetime         not null
 #  visible      :boolean          not null
-#  version      :bigint(8)        not null
+#  version      :bigint           not null
 #
 # Indexes
 #
@@ -234,7 +234,7 @@ class Relation < ApplicationRecord
       element = model.lock("for share").find_by(:id => m[1])
 
       # and check that it is OK to use.
-      raise OSM::APIPreconditionFailedError, "Relation with id #{id} cannot be saved due to #{m[0]} with id #{m[1]}" unless element&.visible? && element&.preconditions_ok?
+      raise OSM::APIPreconditionFailedError, "Relation with id #{id} cannot be saved due to #{m[0]} with id #{m[1]}" unless element&.visible? && element.preconditions_ok?
 
       hash[m[1]] = true
     end