Skip to content

Commit

Permalink
Data dashboard top tags: Return maximum 5.
Browse files Browse the repository at this point in the history
Reference: CV2-4111.
  • Loading branch information
caiosba committed Nov 7, 2024
1 parent ca41cdc commit 4eef8a6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/team_statistics.rb
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ def top_media_tags
end
data = []
tags.each { |tag, value| data << { id: tag, label: tag, value: value } }
data.sort_by{ |object| object[:value] }.reverse
data.sort_by{ |object| object[:value] }.reverse.first(5)
end

# For both articles and tiplines
Expand Down

0 comments on commit 4eef8a6

Please sign in to comment.