Skip to content

Commit

Permalink
CV2-5301: fallback to update_at date in case last_published not exist (
Browse files Browse the repository at this point in the history
  • Loading branch information
melsawy authored Oct 22, 2024
1 parent f487d2d commit 59de256
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/check_search.rb
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ def self.get_exported_data(query, team_id)
pm_report = {}
Dynamic.where(annotation_type: 'report_design', annotated_type: 'ProjectMedia', annotated_id: ids)
.find_each do |raw|
pm_report[raw.annotated_id] = raw.data['last_published'].to_i if raw.data['state'] == 'published'
pm_report[raw.annotated_id] = (raw.data['last_published'] || raw.updated_at).to_i if raw.data['state'] == 'published'
end

# Iterate through each result and generate an output row for the CSV
Expand Down

0 comments on commit 59de256

Please sign in to comment.