uc3-dmp-id 0.1.44 → 0.1.45
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/uc3-dmp-id/updater.rb +3 -2
- data/lib/uc3-dmp-id/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9d7dcde4fbbe78fd142a19c4479d9859971705a28382c6c713ac2bdb86909878
|
4
|
+
data.tar.gz: '009db949440c54efb31aebcc526aa8bed4b488e60d61c5725fdb7e2e8dc0df92'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5dd3fb63bb152a9bd1b2213bf3d1cf3c4541998df05f494882585ab0b0ba3f3c2cd3ff83fb80d2f7f5bb13c83321ab8e72fda58c132d60b3d26910805b526aa4
|
7
|
+
data.tar.gz: 4c5b37240d88c4fab00f11b03a3af14d6e8e8faf5eafd6edee2151f0d04d1ff6060689bf483eeb06392d676207f4d1b43ad41b8aff30cb1453e346a34ec8ebac
|
data/lib/uc3-dmp-id/updater.rb
CHANGED
@@ -89,7 +89,7 @@ module Uc3DmpId
|
|
89
89
|
)
|
90
90
|
raise UpdaterError, Helper::MSG_DMP_INVALID_DMP_ID unless resp.is_a?(Hash)
|
91
91
|
|
92
|
-
dmp = resp['dmp'].nil? ?
|
92
|
+
dmp = resp['dmp'].nil? ? resp : resp['dmp']
|
93
93
|
logger.info(message: 'Existing latest record', details: dmp) if logger.respond_to?(:debug)
|
94
94
|
raise UpdaterError, Helper::MSG_DMP_FORBIDDEN unless provenance.is_a?(Hash) && !provenance['PK'].nil? &&
|
95
95
|
provenance['PK'] == dmp['dmp']['dmphub_provenance_id']
|
@@ -103,10 +103,11 @@ module Uc3DmpId
|
|
103
103
|
}.to_json)
|
104
104
|
|
105
105
|
# Save the changes without creating a new version!
|
106
|
+
logger&.debug(message: "DMP After narrative attachment", details: dmp)
|
106
107
|
resp = client.put_item(json: dmp, logger:)
|
107
108
|
raise UpdaterError, Helper::MSG_DMP_UNABLE_TO_VERSION if resp.nil?
|
108
109
|
|
109
|
-
logger&.debug(message: "Added DMP ID narrative for PK: #{p_key}, Narrative: #{url}"
|
110
|
+
logger&.debug(message: "Added DMP ID narrative for PK: #{p_key}, Narrative: #{url}")
|
110
111
|
true
|
111
112
|
end
|
112
113
|
# rubocop:enable Metrics/AbcSize
|
data/lib/uc3-dmp-id/version.rb
CHANGED