forest_admin_agent 1.8.6 → 1.8.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2d25c2b519a49cdd5110d8611122af3ea0bcd57f80e009a2669d7102053a9cb5
|
4
|
+
data.tar.gz: 357f0e2cbd33aa68ed598b85b0b83c8f600d555bf87c9b74cacb6ecf9d45ee3f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c295f5d048b9f506bd79a2ee38da994da4b5cef3d0b8f6640f78bee97fc06fe94774f8c7f05929d9d51e56be88c8ad40fc435c4bef1e38c7c469df5060df4d46
|
7
|
+
data.tar.gz: 67583f70e8a69e8584f7c15865affd83aea0550219bd57a6ad9215b41912610199e1cf32de254a391687ba6be22804590773c95b439f0f231e66748b7f8a8caa
|
@@ -63,6 +63,13 @@ module ForestAdminAgent
|
|
63
63
|
attributes_map.each do |attribute_name, attr_data|
|
64
64
|
next if !should_include_attr?(attribute_name, attr_data)
|
65
65
|
value = evaluate_attr_or_block(attribute_name, attr_data[:attr_or_block])
|
66
|
+
# Only include the attribute if it's not nil or if the key exists in the object
|
67
|
+
# This prevents setting all fields to null for included records
|
68
|
+
if value.nil?
|
69
|
+
# Check if the key actually exists in the object (for Hash objects)
|
70
|
+
# If the key exists in the object, it means that the value is purposely set to null
|
71
|
+
next unless @object.is_a?(Hash) && @object.key?(attribute_name.to_s)
|
72
|
+
end
|
66
73
|
attributes[format_name(attribute_name)] = value
|
67
74
|
end
|
68
75
|
attributes
|
@@ -138,9 +145,9 @@ module ForestAdminAgent
|
|
138
145
|
end
|
139
146
|
|
140
147
|
object = has_one_relationship(attribute_name, attr_data)
|
141
|
-
if
|
142
|
-
|
143
|
-
|
148
|
+
# Only include 'data' key if the relationship object exists
|
149
|
+
# Omit 'data' key entirely when null instead of setting it to null
|
150
|
+
unless object.nil? || (object.respond_to?(:empty?) && object.empty?)
|
144
151
|
relation = datasource.get_collection(@options[:class_name].gsub('::', '__'))
|
145
152
|
.schema[:fields][attribute_name.to_s]
|
146
153
|
options = @options.clone
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: forest_admin_agent
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.8.
|
4
|
+
version: 1.8.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matthieu
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date: 2025-10-
|
12
|
+
date: 2025-10-20 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activesupport
|