X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/50df5eefcc5c45a47e1fcac50fe3ad6af6245819..f50ca826aad559c77f948ccca61cbdc0bbddf3d1:/app/models/concerns/consistency_validations.rb?ds=sidebyside diff --git a/app/models/concerns/consistency_validations.rb b/app/models/concerns/consistency_validations.rb index 101fd4310..97b6743eb 100644 --- a/app/models/concerns/consistency_validations.rb +++ b/app/models/concerns/consistency_validations.rb @@ -23,13 +23,7 @@ module ConsistencyValidations # This is similar to above, just some validations don't apply def check_create_consistency(new, user) - if new.changeset.nil? - raise OSM::APIChangesetMissingError - elsif new.changeset.user_id != user.id - raise OSM::APIUserChangesetMismatchError - elsif !new.changeset.open? - raise OSM::APIChangesetAlreadyClosedError, new.changeset - end + check_changeset_consistency(new.changeset, user) end ##