Skip to content

Commit

Permalink
lint fix
Browse files Browse the repository at this point in the history
  • Loading branch information
aherzberg committed Apr 29, 2024
1 parent 18ceaee commit 3101ef9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -112,13 +112,12 @@ def events_timeline(attributes)

# sort to put events with uploaded == false on top and then by date
events.compact.sort_by do |event|
upload_priority = if event.uploaded || event.uploaded.nil?
upload_priority = if event[:uploaded] || event.uploaded.nil?
0 # Lower priority for uploaded == true or value nil
else
1 # Higher priority for uploaded == false
end

event_date = event.date || DEFAULT_DATE
event_date = event[:date] || DEFAULT_DATE

[upload_priority, event_date]
end.reverse
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def claim_data
end

it 'returns expected tracked items events in events_timeline field' do
tracked_items = gathering_of_evidence_claim[:events_timeline].select do |event|
tracked_items = gathering_of_evidence_claim[:events_timeline].filter_map do |event|
event.to_h if %w[still_need_from_you_list received_from_you_list].include?(event[:type].to_s)
end

Expand Down

0 comments on commit 3101ef9

Please sign in to comment.