field_mapper 0.2.8 → 0.2.9
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
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a2254aa7007d765eddc8105deb19e45f7ccf0814
|
|
4
|
+
data.tar.gz: 06f47cd9a1151bf4e60d0b1595aa7db50055ef5d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 192194c8fd891e56092f3a88af4e821e024d3fac7d218b608585d4fd8bc6282fa109e8d83f11bbb77149f64318c71c62ca4f282bdd37af0e90bbade7bc486ae2
|
|
7
|
+
data.tar.gz: 876375655e654407a62134a67dff94d83da5d4575c74a9e37c8b3677a2604217ba987479c3b3d6afb110b0cfb3166cdf02d3d0df2781f75a7e86a74cc6bb443d
|
|
@@ -44,15 +44,15 @@ module FieldMapper
|
|
|
44
44
|
protected
|
|
45
45
|
|
|
46
46
|
def get_raw_standard_value(custom_field, raw_custom_value, standard_instance)
|
|
47
|
-
if raw_custom_value.nil?
|
|
48
|
-
return [] if custom_field.standard_field.list_with_emtpy_default?
|
|
49
|
-
return nil
|
|
50
|
-
end
|
|
51
|
-
|
|
52
47
|
strategy = custom_field.flip_strategy(:custom_to_standard)
|
|
53
48
|
custom_flipper = custom_field.custom_flipper?(:custom_to_standard)
|
|
54
49
|
|
|
55
50
|
if !custom_flipper
|
|
51
|
+
if raw_custom_value.nil?
|
|
52
|
+
return [] if custom_field.standard_field.list_with_emtpy_default?
|
|
53
|
+
return nil
|
|
54
|
+
end
|
|
55
|
+
|
|
56
56
|
if custom_field.plat?
|
|
57
57
|
return compute_raw_standard_value_for_plat(custom_field, raw_custom_value)
|
|
58
58
|
end
|
|
@@ -37,15 +37,15 @@ module FieldMapper
|
|
|
37
37
|
protected
|
|
38
38
|
|
|
39
39
|
def get_raw_custom_value(custom_field, raw_standard_value, custom_instance)
|
|
40
|
-
if raw_standard_value.nil?
|
|
41
|
-
return [] if custom_field.list_with_emtpy_default?
|
|
42
|
-
return nil
|
|
43
|
-
end
|
|
44
|
-
|
|
45
40
|
strategy = custom_field.flip_strategy(:standard_to_custom)
|
|
46
41
|
custom_flipper = custom_field.custom_flipper?(:standard_to_custom)
|
|
47
42
|
|
|
48
43
|
if !custom_flipper
|
|
44
|
+
if raw_standard_value.nil?
|
|
45
|
+
return [] if custom_field.list_with_emtpy_default?
|
|
46
|
+
return nil
|
|
47
|
+
end
|
|
48
|
+
|
|
49
49
|
if custom_field.plat?
|
|
50
50
|
return compute_raw_custom_value_for_plat(custom_field, raw_standard_value)
|
|
51
51
|
end
|
data/lib/field_mapper/version.rb
CHANGED