Allow for grabbing of single kit if only one exists for submission type.

This commit is contained in:
lwark
2024-11-13 13:36:03 -06:00
parent 816a0a45f8
commit 514781fd29
9 changed files with 59 additions and 28 deletions

View File

@@ -51,6 +51,9 @@ class SheetWriter(object):
# except Exception as e:
# logger.error(f"Couldn't open workbook due to {e}")
template = self.submission_type.template_file
if not template:
logger.error(f"No template file found, falling back to Bacterial Culture")
template = SubmissionType.retrieve_template_file()
workbook = load_workbook(BytesIO(template))
# self.workbook = workbook
self.xl = workbook