Skip to content

Commit 2b70a26

Browse files
committed
remove unneeded check which introduces a bug
There is a verify_type call a few lines lower which does exactly what we need without causing strange errors when you are using type members with underscores.
1 parent b164c37 commit 2b70a26

1 file changed

Lines changed: 0 additions & 5 deletions

File tree

lib/jsonapi/request.rb

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -610,11 +610,6 @@ def parse_update_relationship_operation(verified_params, relationship, parent_ke
610610
def parse_single_replace_operation(data, keys, id_key_presence_check_required: true)
611611
fail JSONAPI::Exceptions::MissingKey.new if data[:id].nil?
612612

613-
type = data[:type]
614-
if type.nil? || type != format_key(@resource_klass._type).to_s
615-
fail JSONAPI::Exceptions::ParameterMissing.new(:type)
616-
end
617-
618613
key = data[:id]
619614
if id_key_presence_check_required && !keys.include?(key)
620615
fail JSONAPI::Exceptions::KeyNotIncludedInURL.new(key)

0 commit comments

Comments
 (0)