Skip to content

Commit

Permalink
Merge pull request #136 from CDLUC3/datacite-fix
Browse files Browse the repository at this point in the history
fix for datacite harvester to address scenarios when there is only on…
  • Loading branch information
briri authored May 13, 2024
2 parents 77b6602 + 17e3251 commit 0f77402
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/lambdas/harvesters/datacite/app.rb
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,10 @@ def _find_date_range(entries:)
current_year = Date.today.year
# Create a range of years for our DataCite query. Cut it off at the current year
years = years.uniq.sort.reject { |year| year > current_year }
# If there is only one year return it
return years if years.length <= 1

# Determine all of the years between the start and end and return them and sort
start_year = years.first
gap = years.last - years.first
years = [years.first]
Expand Down
1 change: 1 addition & 0 deletions src/lambdas/harvesters/harvestable_dmps/app.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ class HarvestableDmps
'doi.org/10.48321/D1DF9DDDAF',

# University of California, Riverside
'doi.org/10.48321/D106FD79D7',
'doi.org/10.48321/D13BEA529C',
'doi.org/10.48321/D14406894e',
'doi.org/10.48321/D145457051',
Expand Down

0 comments on commit 0f77402

Please sign in to comment.