dmp-dynamo_adapter 0.1.6 → 0.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/dmp/dynamo_adapter.rb +2 -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: 6132be6e3e6a89db5b11dd95f62ed7470516e3b4b7ddb0c54fbe7d70e0b2b51c
|
4
|
+
data.tar.gz: 1bf763c8a0138b9d262c1fff1c99661f74be833b83de2f6b778f987f183d32c3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bb8e0fdcef792b5bfb86fc8c6dc3883c63088ba3ff35ec312e00a078a58d8bb4044060aafb99e1e48b8d21bccc95b13bf0e505b227427c445e6c86fbc9fbd7f5
|
7
|
+
data.tar.gz: ceb2ba37d8ef16facf72dced05b2a686d9a55ad0e09ce4b8d825c95e03d79482d2c222f3c6fed21ab08c1a7b33209a14246a9ba322747d80cfc6d23ef891884a
|
data/lib/dmp/dynamo_adapter.rb
CHANGED
@@ -81,7 +81,7 @@ module Dmp
|
|
81
81
|
|
82
82
|
pk = json['PK']
|
83
83
|
# Translate the incoming :dmp_id into a PK
|
84
|
-
pk =
|
84
|
+
pk = DmpIdHandler.dmp_id_to_pk(json: json.fetch('dmp_id', {})) if pk.nil?
|
85
85
|
|
86
86
|
# find_by_PK
|
87
87
|
response = find_by_pk(p_key: pk, s_key: json['SK']) unless pk.nil?
|
@@ -99,6 +99,7 @@ module Dmp
|
|
99
99
|
json = prepare_json(json: json)
|
100
100
|
return { status: 400, error: MSG_DEFAULT } if json.nil? || @provenance.nil?
|
101
101
|
|
102
|
+
|
102
103
|
# Try to find it first
|
103
104
|
result = find_by_json(json: json)
|
104
105
|
return { status: 500, error: MSG_DEFAULT } if result[:status] == 500
|