From a942a26c20ccd366cf142107e1ec20aef127cc4c Mon Sep 17 00:00:00 2001 From: Rutger Vos Date: Tue, 27 Aug 2024 12:56:46 +0200 Subject: [PATCH] Attempt to trap None Taxon errors --- barcode_validator/result.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/barcode_validator/result.py b/barcode_validator/result.py index 8ccec63..2532fcd 100644 --- a/barcode_validator/result.py +++ b/barcode_validator/result.py @@ -376,11 +376,13 @@ def get_values(self) -> list: String representation of the result object. :return: A list of values representing the result object """ + exp_taxon_name = self.exp_taxon.name if self.exp_taxon else None + species_name = self.species.name if self.species else None return [ self.process_id, - self.exp_taxon.name, - self.species.name, - self.exp_taxon.name if self.check_taxonomy() else None, + exp_taxon_name, + species_name, + exp_taxon_name if self.check_taxonomy() else None, self.level, 'BLAST', self.seq_length,