]> git.openstreetmap.org Git - rails.git/commitdiff
Rename create element consistency check
authorAnton Khorev <tony29@yandex.ru>
Sat, 30 Mar 2024 07:13:24 +0000 (10:13 +0300)
committerAnton Khorev <tony29@yandex.ru>
Sat, 30 Mar 2024 07:13:24 +0000 (10:13 +0300)
app/models/concerns/consistency_validations.rb
app/models/node.rb
app/models/relation.rb
app/models/way.rb

index 97b6743ebc80752b1a5f9e9ef0f7b8f2592dc7fc..a99896b3ce4fde833f8103539273a934503ba7cc 100644 (file)
@@ -22,7 +22,7 @@ module ConsistencyValidations
   end
 
   # This is similar to above, just some validations don't apply
-  def check_create_consistency(new, user)
+  def check_create_element_consistency(new, user)
     check_changeset_consistency(new.changeset, user)
   end
 
index ad4318487b722839771e0a94b9cfc62561a966bd..385bc732a6051a32e88ddbbfd050568cc22e16c9 100644 (file)
@@ -189,7 +189,7 @@ class Node < ApplicationRecord
   end
 
   def create_with_history(user)
-    check_create_consistency(self, user)
+    check_create_element_consistency(self, user)
     self.version = 0
     self.visible = true
 
index 0a4a660a6fa536c52a025a4b337c521e85ab59be..c87f70dad48fbb3ff6b4ba92188d1d82640ba680 100644 (file)
@@ -195,7 +195,7 @@ class Relation < ApplicationRecord
   end
 
   def create_with_history(user)
-    check_create_consistency(self, user)
+    check_create_element_consistency(self, user)
     raise OSM::APIPreconditionFailedError, "Cannot create relation: data or member data is invalid." unless preconditions_ok?
 
     self.version = 0
index b11c225ddb1cfd0a6fb604174d4e39354eab0276..2a989f9f3b6d6068647d41c7c2fa47aa5a01a52b 100644 (file)
@@ -155,7 +155,7 @@ class Way < ApplicationRecord
   end
 
   def create_with_history(user)
-    check_create_consistency(self, user)
+    check_create_element_consistency(self, user)
     raise OSM::APIPreconditionFailedError, "Cannot create way: data is invalid." unless preconditions_ok?
 
     self.version = 0