Pre-fixing JSON update bug.

This commit is contained in:
Landon Wark
2024-04-15 08:12:36 -05:00
parent f994f81d11
commit 7c46578d21
9 changed files with 90 additions and 40 deletions

View File

@@ -266,7 +266,11 @@ class ReagentParser(object):
# logger.debug(f"Got lot for {item}-{name}: {lot} as {type(lot)}")
lot = str(lot)
logger.debug(f"Going into pydantic: name: {name}, lot: {lot}, expiry: {expiry}, type: {item.strip()}, comment: {comment}")
if name.lower() != "not applicable":
try:
check = name.lower() != "not applicable"
except AttributeError:
check = True
if check:
listo.append(PydReagent(type=item.strip(), lot=lot, expiry=expiry, name=name, comment=comment, missing=missing))
return listo