forest_admin_datasource_toolkit 1.0.0.pre.beta.89 → 1.0.0.pre.beta.90
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: a40a0774b08939b694296622a3faf58dfe3194fe994991dd89ba9c1018ca00fc
|
4
|
+
data.tar.gz: ba99d2f778945fa7544a9d6c419d1189e718c560fac94ce5ec6031483a5c53e0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 87f6bc783d22217692009e8d7cd5fe81d2e625ea35cb22e8f0e4968362d72dbc7e8a12190027055b2c04dd72a91ad997b2561c820d1d786a6edf3a4e2beef8fb
|
7
|
+
data.tar.gz: 787fdab48cdf9e74a91b443e5117d08f6ec4bbc12b6d5e3b77e806c9cb219d17f284b8f3a364f0575ad8d41dc3847c203a34aeb8e113f4ddc45d11a855cbd0cf
|
@@ -9,7 +9,8 @@ module ForestAdminDatasourceToolkit
|
|
9
9
|
schema = path[1]
|
10
10
|
memo += [column_name] if schema.type == 'Column'
|
11
11
|
|
12
|
-
|
12
|
+
to_one_relations = %w[OneToOne ManyToOne PolymorphicOneToOne]
|
13
|
+
if to_one_relations.include?(schema.type)
|
13
14
|
relation = collection.datasource.get_collection(schema.foreign_collection)
|
14
15
|
relation_columns = relation.schema[:fields]
|
15
16
|
.select { |_column_name, relation_column| relation_column.type == 'Column' }
|
@@ -13,7 +13,7 @@ module ForestAdminDatasourceToolkit
|
|
13
13
|
raise ForestException, "Unknown field #{key}"
|
14
14
|
elsif schema.type == 'Column'
|
15
15
|
FieldValidator.validate(collection, key, record_data[key])
|
16
|
-
elsif
|
16
|
+
elsif ['OneToOne', 'ManyToOne'].include?(schema.type)
|
17
17
|
sub_record = record_data[key]
|
18
18
|
association = collection.datasource.get_collection(schema.foreign_collection)
|
19
19
|
RecordValidator.validate(association, sub_record)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: forest_admin_datasource_toolkit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.0.pre.beta.
|
4
|
+
version: 1.0.0.pre.beta.90
|
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-01-
|
12
|
+
date: 2025-01-15 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activesupport
|