uc3-dmp-id 0.1.42 → 0.1.44

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: 695e328f070a7c67f18304d29b91bd6eb02b4e4b8837920251992a8d4fb9f45e
4
- data.tar.gz: 4b56c89bdac914e542632609197eeae093cf3044bbe042022fc854099fc4a7ec
3
+ metadata.gz: 63803c8aabd262a7357675e4880942f3348a695fbdfbf58fd3aa388338a628eb
4
+ data.tar.gz: be773b2721b562d535c421c40ae1a8a5269db6d82a30972b50bf4111f1508dbb
5
5
  SHA512:
6
- metadata.gz: 73df59ca0477908042b4856e133722141a1c34b6e5827e32984adcbce1b5073dd1a6aa2403c77386ec4cdfaecf5c9e7199fe0fa8b5980ffe21dd3961aade44a5
7
- data.tar.gz: e3e1b86005ae9df9c6cf6e1438964fb6f4e0df1639ecec99d6568c7ffcee92767fd076a8b78900f1af941dbe776011f0904bed4aa2713ce55e316573c95081e5
6
+ metadata.gz: edd0735cda459672643482cbab54413fc8e65afda95b9390e0d194c5b97721040e849f2d8ae2ddf8fbe8df96f63148ded1ea47c594ecc9b69bb16bcb113013e7
7
+ data.tar.gz: 0614471fb7c7b39b10a3f94f90f419279efb90e1854ec1e182ece01e0c676e11cc4d0985fe8c579809729008104612ff1702cc67285d2540994d2f5de9d22f9d
@@ -82,7 +82,14 @@ module Uc3DmpId
82
82
 
83
83
  # fetch the existing latest version of the DMP ID
84
84
  client = Uc3DmpDynamo::Client.new(logger:)
85
- dmp = Finder.by_pk(p_key:, client:, logger:, cleanse: false)
85
+ # dmp = Finder.by_pk(p_key:, client:, logger:, cleanse: false)
86
+ resp = client.get_item(
87
+ key: { PK: Helper.append_pk_prefix(p_key:), SK: Helper::DMP_LATEST_VERSION },
88
+ logger:
89
+ )
90
+ raise UpdaterError, Helper::MSG_DMP_INVALID_DMP_ID unless resp.is_a?(Hash)
91
+
92
+ dmp = resp['dmp'].nil? ? JSON.parse({ dmp: resp }.to_json) : resp
86
93
  logger.info(message: 'Existing latest record', details: dmp) if logger.respond_to?(:debug)
87
94
  raise UpdaterError, Helper::MSG_DMP_FORBIDDEN unless provenance.is_a?(Hash) && !provenance['PK'].nil? &&
88
95
  provenance['PK'] == dmp['dmp']['dmphub_provenance_id']
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Uc3DmpId
4
- VERSION = '0.1.42'
4
+ VERSION = '0.1.44'
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.1.42
4
+ version: 0.1.44
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Riley