X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/349200fb0a36cbf9142487ee98c3361c8e4a655f..f0d19b04f6afa4a5ed41b1d58e0469de4fbd0c8c:/app/models/relation.rb diff --git a/app/models/relation.rb b/app/models/relation.rb index f09647320..0742976e8 100644 --- a/app/models/relation.rb +++ b/app/models/relation.rb @@ -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