diff --git a/src/python/paperai/report/common.py b/src/python/paperai/report/common.py index ed524db..521a664 100644 --- a/src/python/paperai/report/common.py +++ b/src/python/paperai/report/common.py @@ -226,11 +226,12 @@ def calculate(self, uid, metadata): fields[name] = "" # Add extraction fields - for name, value in self.extractor(extractions, texts): - # Resolves the full value based on column parameters - fields[name] = ( - self.resolve(params, sections, uid, name, value) if value else "" - ) + if extractions: + for name, value in self.extractor(extractions, texts): + # Resolves the full value based on column parameters + fields[name] = ( + self.resolve(params, sections, uid, name, value) if value else "" + ) # Add question fields names, qa, contexts, snippets = [], [], [], []