Skip to content

Commit

Permalink
πŸ› template_checker: empty dict if no template
Browse files Browse the repository at this point in the history
  • Loading branch information
WillForan committed Nov 24, 2024
1 parent 6213044 commit b218d53
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions template_checker.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,19 +80,20 @@ def check_header(self, hdr) -> CheckResult:
:returns: conforming status, errors, and comparison information
"""
template = self.db.get_template(hdr["Project"], hdr["SequenceName"])
template = dict(template)

# no template, no errors
if template:
template = dict(template)
errors = find_errors(template, hdr)
else:
template = {}
errors = {}

return {
"conforms": not errors,
"errors": errors,
"input": hdr,
"template": dict(template),
"template": template,
}

def check_row(self, row: dict) -> CheckResult:
Expand Down

0 comments on commit b218d53

Please sign in to comment.