Skip to content

Commit

Permalink
fix lovos
Browse files Browse the repository at this point in the history
  • Loading branch information
amotl committed Sep 3, 2024
1 parent 5b43bb5 commit 6c7c43b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cratedb_toolkit/io/mongodb/export.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,9 @@ def get_rules(self, all_types):
def apply_rules(self, rules):
for item in self.data:
for rule in rules:
item[rule["name"]] = rule["converter"](item[rule["name"]])
name = rule["name"]
if name in item:
item[name] = rule["converter"](item[name])

@staticmethod
def get_best_converter(types: t.List[str]) -> t.Callable:
Expand Down

0 comments on commit 6c7c43b

Please sign in to comment.