dmp-dynamo_adapter 0.3.4 → 0.3.5
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 +1 -2
- 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: e43418981a0779208d1a8a30b20c49bc1b7694170dd750d21f0a55397dd26270
|
4
|
+
data.tar.gz: 8a31a47ea2e473a3297050cb3f3f6499ce1f62f220c8b25014f775153b542fbe
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a4165f8e97a095e1390a7e8338a5b8fbfb56e40735a43432a1ace264d7ae2f6e9d093d7ab02efec61ef7f30a7858178ca3eb956d7e727a58a847d7566bc45580
|
7
|
+
data.tar.gz: 18d6c30540bef144f768034c3c35e05f43d2a892f49bd0b1eafc6bcdc3b332efc6e3fcaa903d145197c6528009ca93deff9c2daab016ba920de8baed8d7d051d
|
data/lib/dmp/dynamo_adapter.rb
CHANGED
@@ -285,8 +285,7 @@ pp response.data
|
|
285
285
|
return { status: 404, error: MSG_NOT_FOUND } if response.nil? || response[:count] <= 0
|
286
286
|
|
287
287
|
# If we got a hit, fetch the DMP and return it.
|
288
|
-
find_by_pk(p_key: response.
|
289
|
-
s_key: response.fetch(:last_evaluated_key, {})[:range_key_element])
|
288
|
+
find_by_pk(p_key: response[:items].first['PK'], s_key: response[:items].first['SK'])
|
290
289
|
rescue Aws::Errors::ServiceError => e
|
291
290
|
{ status: 500, error: "#{MSG_DEFAULT} - #{e.message}" }
|
292
291
|
end
|