Skip to content

Commit

Permalink
ensure processor exists prior to checking map_item (processors may be…
Browse files Browse the repository at this point in the history
… removed/deprecated)
  • Loading branch information
dale-wahl committed Sep 13, 2023
1 parent b32ddca commit 2184e2e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion common/lib/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -819,7 +819,7 @@ def get_columns(self):
# no file to get columns from
return False

if (self.get_results_path().suffix.lower() == ".csv") or (self.get_results_path().suffix.lower() == ".ndjson" and self.get_own_processor().map_item_method_available(dataset=self)):
if (self.get_results_path().suffix.lower() == ".csv") or (self.get_results_path().suffix.lower() == ".ndjson" and self.get_own_processor() is not None and self.get_own_processor().map_item_method_available(dataset=self)):
return self.get_item_keys(processor=self.get_own_processor())
else:
# Filetype not CSV or an NDJSON with `map_item`
Expand Down

0 comments on commit 2184e2e

Please sign in to comment.