Skip to content

Commit

Permalink
Fix model validator
Browse files Browse the repository at this point in the history
  • Loading branch information
bruno-f-cruz committed Aug 14, 2024
1 parent 4417d92 commit fdc7dba
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/DataSchemas/aind_behavior_force_foraging/task_logic.py
Original file line number Diff line number Diff line change
Expand Up @@ -386,10 +386,10 @@ class ForceLookUpTable(BaseModel):

@model_validator(mode="after")
def _validate_bounds(self) -> Self:
if self.left_min < self.left_max:
raise ValueError("Left min must be greater than left max")
if self.right_min < self.right_max:
raise ValueError("Right min must be greater than right max")
if self.left_min > self.left_max:
raise ValueError("Left min must be less than left max")
if self.right_min > self.right_max:
raise ValueError("Right min must be less than right max")
return self


Expand Down

0 comments on commit fdc7dba

Please sign in to comment.