deep_unrest 0.1.61 → 0.1.62
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/deep_unrest/version.rb +1 -1
- data/lib/deep_unrest/write.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: 3cdd100ae786dce970917ecca2ea6941e024b238cd0622ede22a62d2c7c545fb
|
4
|
+
data.tar.gz: dad9d75980069a8e7ee8b063c0d82d5f60eade85f85f3cb3493e6a3522dfc259
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7dcef71047487561e73d1c2ed5f5ec0e192c19f6f93fe0652bad2eb378c0b57e9e1875a5ae7e6ff3aef32e7bad4d106360e611c71154a988f37097dccbc43c2c
|
7
|
+
data.tar.gz: 44f35b6eccd266c5d163f1007b023537b6fa0a8f2efaab701169a512fa1a57a38ffaf50532ebddc5e637322670cf3ccf2bb8c97d8577708a29eb3d47d91d9dfd
|
data/lib/deep_unrest/version.rb
CHANGED
data/lib/deep_unrest/write.rb
CHANGED
@@ -164,14 +164,13 @@ module DeepUnrest
|
|
164
164
|
changed.select { |c| c[:query_uuid] }
|
165
165
|
.each_with_object({}) do |c, memo|
|
166
166
|
mapping = mappings.find { |m| m.dig(:query, :uuid) == c[:query_uuid] }
|
167
|
-
next
|
168
|
-
next if mapping[:addr].blank?
|
167
|
+
next if !mapping || mapping[:addr].blank?
|
169
168
|
|
170
169
|
mapping[:query][:fields] = c[:attributes].keys
|
171
170
|
mapping[:record] = c[:klass].new(id: c[:id])
|
172
171
|
mapping[:record].assign_attributes(c[:attributes])
|
173
172
|
result = DeepUnrest.serialize_result(ctx, mapping)
|
174
|
-
DeepUnrest.set_attr(memo, mapping[:addr], result)
|
173
|
+
DeepUnrest.set_attr(memo, mapping[:addr].clone, result)
|
175
174
|
end
|
176
175
|
end
|
177
176
|
|