summaryrefslogtreecommitdiff
path: root/ishtar_common/data_importer.py
diff options
context:
space:
mode:
Diffstat (limited to 'ishtar_common/data_importer.py')
-rw-r--r--ishtar_common/data_importer.py15
1 files changed, 4 insertions, 11 deletions
diff --git a/ishtar_common/data_importer.py b/ishtar_common/data_importer.py
index 19746315a..16d9ce8d8 100644
--- a/ishtar_common/data_importer.py
+++ b/ishtar_common/data_importer.py
@@ -408,18 +408,11 @@ class StrToBoolean(Formater, ChoiceChecker):
self.missings = set()
if self.db_target:
for target_key in self.db_target.keys.filter(is_set=True).all():
- value = target_key.value
- value = self.prepare(value)
- if value in self.dct:
+ key = self.prepare(target_key.key)
+ if key in self.dct:
continue
- v = target_key.key
- if v in ('False', '0'):
- v = False
- elif v:
- v = True
- else:
- v = None
- self.dct[value] = v
+ v = target_key.format()
+ self.dct[key] = v
self.new_keys = {}
def prepare(self, value):