Skip to content

Commit

Permalink
make sure download_count is integer. #396
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Fenner committed Feb 1, 2020
1 parent b3a2c77 commit 80629cc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/models/doi.rb
Original file line number Diff line number Diff line change
Expand Up @@ -876,7 +876,7 @@ def view_ids
end

def view_count
views.pluck(:total).inject(:+)
views.pluck(:total).inject(:+).to_i
end

def views_over_time
Expand All @@ -888,7 +888,7 @@ def download_ids
end

def download_count
downloads.pluck(:total).inject(:+)
downloads.pluck(:total).inject(:+).to_i
end

def downloads_over_time
Expand Down

0 comments on commit 80629cc

Please sign in to comment.