X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/319e54e08a9803c2218ec126bce4ed6eb9965127..2fabc46421f9e908ef6902ea7c4890a0032af446:/app/models/relation.rb diff --git a/app/models/relation.rb b/app/models/relation.rb index a231feddb..4200a08dd 100644 --- a/app/models/relation.rb +++ b/app/models/relation.rb @@ -206,6 +206,8 @@ class Relation < ApplicationRecord end def preconditions_ok?(good_members = []) + raise OSM::APITooManyRelationMembersError.new(id, members.length, Settings.max_number_of_relation_members) if members.length > Settings.max_number_of_relation_members + # These are hastables that store an id in the index of all # the nodes/way/relations that have already been added. # If the member is valid and visible then we add it to the