Skip to content

Commit

Permalink
Fix broken validation
Browse files Browse the repository at this point in the history
  • Loading branch information
islean committed Jan 29, 2025
1 parent f0899fb commit 40f90d2
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class MutantSample(Sample):
def set_original_lab_address(cls, data: any) -> any:
if isinstance(data, dict):
is_set = bool(data.get("original_lab_address"))
if not is_set:
if not is_set and data.get("original_lab"):
data["original_lab_address"] = ORIGINAL_LAB_ADDRESSES[data["original_lab"]]
return data

Expand All @@ -52,7 +52,7 @@ def set_original_lab_address(cls, data: any) -> any:
def set_region_code(cls, data: any) -> any:
if isinstance(data, dict):
is_set = bool(data.get("region_code"))
if not is_set:
if not is_set and data.get("region"):
data["region_code"] = REGION_CODES[data["region"]]
return data

Expand Down

0 comments on commit 40f90d2

Please sign in to comment.