uc3-dmp-id 0.0.30 → 0.0.31
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/creator.rb +1 -1
- data/lib/uc3-dmp-id/updater.rb +1 -1
- 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: d5b26fcb35c29e0e10f7becd2288f81c91b0c9d915f52e15c2c1e6eb13951333
|
4
|
+
data.tar.gz: ba9efe6d581580c2c74313c4a88804c1f28a152a057b30ff66c84d10b9150ebc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b50d96d616da07d16445eed9795d20b53ff824a99f4661556fa45654b6c967487c378d390235ac7b12c85fac30a4a6c9c52c6982fc57be9b7b6f22b99c5cb444
|
7
|
+
data.tar.gz: c781cd5e543dab4c6875d3db4277ada23219d1505742361f15ea3c2c67fc56f5d8255622784e350b22d18b09d6b766d2725cc2ec5400a26ea29ac65959038bb2
|
data/lib/uc3-dmp-id/creator.rb
CHANGED
@@ -20,7 +20,7 @@ module Uc3DmpId
|
|
20
20
|
|
21
21
|
# Validate the incoming JSON first
|
22
22
|
errs = Validator.validate(mode: 'author', json: Helper.parse_json(json: json))&.fetch('dmp', {})
|
23
|
-
raise CreatorError, errs.join(', ') if errs.is_a?(Array) && errs.any?
|
23
|
+
raise CreatorError, errs.join(', ') if errs.is_a?(Array) && errs.any? && errs.first != Validator::MSG_VALID_JSON
|
24
24
|
|
25
25
|
# Fail if the provenance or owner affiliation are not defined
|
26
26
|
raise CreatorError, MSG_NO_PROVENANCE_OWNER if provenance.nil? || owner_org.nil?
|
data/lib/uc3-dmp-id/updater.rb
CHANGED
@@ -47,7 +47,7 @@ module Uc3DmpId
|
|
47
47
|
def _updateable?(provenance:, p_key:, json:)
|
48
48
|
# Validate the incoming JSON first
|
49
49
|
errs = Validator.validate(mode: 'author', json: json)&.fetch('dmp', {})
|
50
|
-
return errs.join(', ') if errs.is_a?(Array) && errs.any?
|
50
|
+
return errs.join(', ') if errs.is_a?(Array) && errs.any? && errs.first != Validator::MSG_VALID_JSON
|
51
51
|
|
52
52
|
# Fail if the provenance is not defined
|
53
53
|
return [MSG_DMP_FORBIDDEN] unless provenance.is_a?(Hash) && !provenance['PK'].nil?
|
data/lib/uc3-dmp-id/version.rb
CHANGED