dmp-dynamo_adapter 0.3.1 → 0.3.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/dmp/dynamo_adapter.rb +2 -3
- 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: c92cdfbca935a7f55b15a3e97c8da2fa99a76bd7a3f8800e28fc898a2ff942ef
|
4
|
+
data.tar.gz: 7785c5585152dc251d08d0298ba3e961c3480f4a734eb2f67e0c8fc197e23e0d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d3b1f1e2d7701b9589c77c4ac9789f078ee4b78c67028252c957e3fcc3599158cc2e48afacce4b8fb6819028aa01a8a1156066a7073bec9f1e8634337a38bcc9
|
7
|
+
data.tar.gz: 66ad68df01a6a83ebaca5c8e178b931d540547542f9ae21151fe9d084e4dbd2cf0d1d96b00a3675d2f7d648110a00fe2bbaa0052198e1fb6f0f6d769c258a0e9
|
data/lib/dmp/dynamo_adapter.rb
CHANGED
@@ -70,8 +70,7 @@ p "FINDING BY PK: PK - #{p_key.inspect} / SK - #{s_key.inspect}"
|
|
70
70
|
return_consumed_capacity: @debug_mode ? 'TOTAL' : 'NONE'
|
71
71
|
}
|
72
72
|
)
|
73
|
-
return { status: 404, error: MSG_NOT_FOUND } if response[:
|
74
|
-
response[:items].empty?
|
73
|
+
return { status: 404, error: MSG_NOT_FOUND } if response[:item].nil? || response[:item].empty?
|
75
74
|
|
76
75
|
{ status: 200, items: [response[:item]] }
|
77
76
|
rescue Aws::Errors::ServiceError => e
|
@@ -90,7 +89,7 @@ p "FINDING BY PK: PK - #{p_key.inspect} / SK - #{s_key.inspect}"
|
|
90
89
|
|
91
90
|
# find_by_PK
|
92
91
|
response = find_by_pk(p_key: pk, s_key: json['SK']) unless pk.nil?
|
93
|
-
return response unless response[:status]
|
92
|
+
return response unless response[:status] == 404
|
94
93
|
|
95
94
|
# find_by_dmphub_provenance_id -> if no PK and no dmp_id result
|
96
95
|
find_by_dmphub_provenance_identifier(json: json)
|