Skip to content

Commit

Permalink
simplify db query. #676
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Fenner committed Nov 27, 2020
1 parent b678846 commit 37ea092
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/controllers/exports_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ def repositories
csv = headers.to_csv

# get doi counts from database
dois_by_client = DataciteDoi.where(type: "DataciteDoi").where(aasm_state: ["findable", "registered"]).group(:datacentre).count
dois_by_client = DataciteDoi.where.not(aasm_state: "draft").group(:datacentre).count

clients.each do |client|
# Limit for salesforce default of max 80 chars
Expand Down

0 comments on commit 37ea092

Please sign in to comment.