|
@@ -118,14 +118,19 @@ class ParseMapping:
|
|
"Invalid from field"
|
|
"Invalid from field"
|
|
|
|
|
|
result = {}
|
|
result = {}
|
|
-
|
|
|
|
- for d in self._mapping:
|
|
|
|
- if key in d and d[key] is not None and d[key]:
|
|
|
|
- result.update({d[self._source]: d[key]})
|
|
|
|
-
|
|
|
|
|
|
+
|
|
|
|
+ for column_mapping in self._mapping:
|
|
|
|
+
|
|
|
|
+ if (key in column_mapping and column_mapping[key] is not None\
|
|
|
|
+ and column_mapping[key] and (column_mapping[key] == value or value is None))\
|
|
|
|
+ or (column_mapping[key] == value):
|
|
|
|
+
|
|
|
|
+ result.update({column_mapping[self._source]: column_mapping[key]})
|
|
|
|
+
|
|
return result
|
|
return result
|
|
|
|
|
|
|
|
|
|
|
|
+
|
|
def get_default_values(self) -> dict:
|
|
def get_default_values(self) -> dict:
|
|
'''
|
|
'''
|
|
'''
|
|
'''
|