# This will throw an exception if there is an inconsistency
def check_consistency(old, new, user)
if new.id != old.id || new.id.nil? || old.id.nil?
# This will throw an exception if there is an inconsistency
def check_consistency(old, new, user)
if new.id != old.id || new.id.nil? || old.id.nil?
elsif new.version != old.version
raise OSM::APIVersionMismatchError.new(new.id, new.class.to_s, new.version, old.version)
elsif new.changeset.nil?
elsif new.version != old.version
raise OSM::APIVersionMismatchError.new(new.id, new.class.to_s, new.version, old.version)
elsif new.changeset.nil?
end
end
# This is similar to above, just some validations don't apply
def check_create_consistency(new, user)
if new.changeset.nil?
end
end
# This is similar to above, just some validations don't apply
def check_create_consistency(new, user)
if new.changeset.nil?