uc3-dmp-id 0.0.69 → 0.0.70

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: add557c6bfad4f39ab0fcc4b164b4a50dd2f33c9fefa823ad95145e40d2d2495
4
- data.tar.gz: 8b1fb5ab9edbb3e783d95419eac15f645fab8c91804a24f24996dfabb74f130a
3
+ metadata.gz: f0ca5545af2c686ec3c72c6d87ee6035f2c32d15e4e02e88a2242405d989c723
4
+ data.tar.gz: dc8abcfa7e6f83b0f4c65701595d57f6dfa8a3ba59049b3a90814eaa08036c35
5
5
  SHA512:
6
- metadata.gz: 937ecb14c0178243e8c91ec21af41343cc6f9b898104587fa856723a2b9b87d335819f9838f7838382dbc65661c753e6836f526e526954bdaa1c159621d1df1f
7
- data.tar.gz: 4d0adec75e6ad372d21a9a2d56565381e5cf898366f55474465c046801ae067c753eda2a4b00e2a69e70116016532d4ee9b3aaf16952a6d216ddb4de3a5e032b
6
+ metadata.gz: f1396221ec09ad597c60b0227263589ef4ab5dbec2a0522ccfd264d87d4c7125bb69d0953be1faa3a3bb1cf0e9ad0a10472d1933501edb7d54a8fdd137017d7c
7
+ data.tar.gz: 00b202a1a166b2ad2a334503991e20d470e0ed445e5635a199c244c5622e2d3f8bbbf13da07989b2958625904f13c3fd067a96ff5eaec6d304630b723f5886f6
@@ -191,9 +191,15 @@ module Uc3DmpId
191
191
  json.fetch('dmp_id', {})['identifier'].nil?
192
192
 
193
193
  # Record the original Provenance system's identifier
194
- annotated['dmphub_provenance_identifier'] = format_provenance_id(
195
- provenance: provenance, value: json.fetch('dmp_id', {})['identifier']
196
- )
194
+ # If we are currently seeding records for existing DMP IDs, then use the :dmproadmap_links
195
+ if provenance.fetch('seedingWithLiveDmpIds', false).to_s.downcase == 'true' &&
196
+ !annotated.fetch('dmproadmap_links', {})['get'].nil?
197
+ annotated['dmphub_provenance_identifier'] = annotated.fetch('dmproadmap_links', {})['get']
198
+ else
199
+ annotated['dmphub_provenance_identifier'] = format_provenance_id(
200
+ provenance: provenance, value: json.fetch('dmp_id', {})['identifier']
201
+ )
202
+ end
197
203
  annotated
198
204
  end
199
205
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Uc3DmpId
4
- VERSION = '0.0.69'
4
+ VERSION = '0.0.70'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: uc3-dmp-id
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.69
4
+ version: 0.0.70
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Riley