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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1f4ce38233177d1b1e22baed19433da77c8a25c0acee58101ba4e850addd687f
4
- data.tar.gz: 3759570bcfa5ca95481b06e138f9c87019a26b16bc328b57ec47605ea23d1b35
3
+ metadata.gz: d5b26fcb35c29e0e10f7becd2288f81c91b0c9d915f52e15c2c1e6eb13951333
4
+ data.tar.gz: ba9efe6d581580c2c74313c4a88804c1f28a152a057b30ff66c84d10b9150ebc
5
5
  SHA512:
6
- metadata.gz: c28f028177f51d082e1a002038743f274ca7032e2fb5fca74fdea186641e2286b1219e71b2dbb3279e2023a7a1e3fa3e25513c5f3eda9d7527601e2c81b0e750
7
- data.tar.gz: dbc4defdafb8221e41127d12e74fb7439761f1eea5e5a4fb5f1ced7de110584bd1b45cca9f11a0f769bf9663af155b6a238dd155e08392eb80f075f6c4344821
6
+ metadata.gz: b50d96d616da07d16445eed9795d20b53ff824a99f4661556fa45654b6c967487c378d390235ac7b12c85fac30a4a6c9c52c6982fc57be9b7b6f22b99c5cb444
7
+ data.tar.gz: c781cd5e543dab4c6875d3db4277ada23219d1505742361f15ea3c2c67fc56f5d8255622784e350b22d18b09d6b766d2725cc2ec5400a26ea29ac65959038bb2
@@ -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?
@@ -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?
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Uc3DmpId
4
- VERSION = '0.0.30'
4
+ VERSION = '0.0.31'
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.30
4
+ version: 0.0.31
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Riley