Skip to content

Commit f4f289a

Browse files
Zinoshishirmk
authored andcommitted
Remove duplicate id_hash call from #record_hash
1 parent faa8fe6 commit f4f289a

1 file changed

Lines changed: 0 additions & 1 deletion

File tree

lib/fast_jsonapi/serialization_core.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,6 @@ def relationships_hash(record, relationships = nil)
8686
def record_hash(record, params = {})
8787
if cached
8888
record_hash = Rails.cache.fetch(record.cache_key, expires_in: cache_length, race_condition_ttl: race_condition_ttl) do
89-
temp_hash = id_hash(id_from_record(record), record_type) || { id: nil, type: record_type }
9089
temp_hash = id_hash(id_from_record(record), record_type, true)
9190
temp_hash[:attributes] = attributes_hash(record, params) if attributes_to_serialize.present?
9291
temp_hash[:relationships] = {}

0 commit comments

Comments
 (0)