Fix deserialization bug in JSONAPI deserializable resource

This commit is contained in:
ari 2024-04-28 12:14:05 +03:00
parent 2c4418d5ec
commit 65826973f0
No known key found for this signature in database
GPG Key ID: 1A5559E2E32F1805

View File

@ -189,7 +189,7 @@ module JSONAPI
register_mappings(hash.keys, "/relationships/#{key}") register_mappings(hash.keys, "/relationships/#{key}")
if options.[](:with_included) if options.[](:with_included) && id.present? && type.present?
return {**hash, key.to_sym => find_in_included(id:, type:)} return {**hash, key.to_sym => find_in_included(id:, type:)}
end end