dmp-dynamo_adapter 0.2.5 → 0.2.6
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 -5
- 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: be57979b11b7ac8a35b820835768a0d3118b54dc82134ba099c24d338858d603
|
4
|
+
data.tar.gz: 4a4e3804862bce06a1aec7cf91b0b7164c2ad3a256ce4e57fb2a7e869dcdaaee
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 69d866715074b1b34444b30cc64489af45b10ca90f5aa27d079dba2f4bfac17feaac7e74fc60a8837465fb4a67c801dbdf762665d40408fd8938c204a53d2628
|
7
|
+
data.tar.gz: 53e24074d088a3d5a5d1232257679b6018a221d7c140fe5a91e012ba409d78383035e588e344fdcf5111bd970fe639851e785c32b170e348af15d02e0547bfe8
|
data/lib/dmp/dynamo_adapter.rb
CHANGED
@@ -105,13 +105,9 @@ p "FINDING BY PK: PK - #{p_key.inspect} / SK - #{s_key.inspect}"
|
|
105
105
|
|
106
106
|
# Try to find it first
|
107
107
|
result = find_by_json(json: json)
|
108
|
-
|
109
|
-
p "RESULT:"
|
110
|
-
pp result
|
111
|
-
|
112
108
|
return { status: 500, error: result.fetch(:error, MSG_DEFAULT) } if result[:status] == 500
|
113
109
|
# Abort if found
|
114
|
-
return { status: 400, error: MSG_EXISTS } if result
|
110
|
+
return { status: 400, error: MSG_EXISTS } if result.fetch(:items, []).any?
|
115
111
|
|
116
112
|
# allocate a DMP ID
|
117
113
|
p_key = Dmp::DmpIdHandler.preregister_dmp_id
|