eco-helpers 0.6.11 → 0.6.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/eco/api/session/batch_job.rb +8 -4
- data/lib/eco/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c1e358356be528278f42f84b31c7c424f7b31ea8
|
4
|
+
data.tar.gz: 89ba02ced70d6c8bc6c20aad8aeb10de7d13ba7c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5006f558bd72e842aea131973da0667ce691ed65f44b1e8230fe555fa0eb648ca82afb6174465ab744869ad0f6952d9ccea9135340b680961200e0929a06d4f0
|
7
|
+
data.tar.gz: 416ce02543a5d8fe8493ebcf46c5e5e3bf6ec84e032dfbfe637fd8f635eb32730b07855c5240ae93bb8b6867e11240a469a7694e8818fa0a8dd64032f151bfbd
|
@@ -55,7 +55,7 @@ module Eco
|
|
55
55
|
callback = @callbacks[entry]
|
56
56
|
e = entry
|
57
57
|
e = callback.call(entry) if callback
|
58
|
-
e = nil if as_update(e).empty?
|
58
|
+
e = nil if as_update(e).empty? && @type!=:delete
|
59
59
|
e
|
60
60
|
end.compact
|
61
61
|
end
|
@@ -99,9 +99,13 @@ module Eco
|
|
99
99
|
|
100
100
|
def as_update(update)
|
101
101
|
hash = update if update.is_a?(Hash)
|
102
|
-
|
103
|
-
|
104
|
-
|
102
|
+
if @type == :delete
|
103
|
+
hash = update.as_json.slice("id", "external_id")
|
104
|
+
else
|
105
|
+
hash = update.as_update if update.is_a?(Ecoportal::API::V1::Person)
|
106
|
+
fields = hash&.dig('details', 'fields')
|
107
|
+
fields&.map! { |fld| fld&.slice("id", "alt_id", "value") }
|
108
|
+
end
|
105
109
|
hash || {}
|
106
110
|
end
|
107
111
|
|
data/lib/eco/version.rb
CHANGED