Skip to content

Commit

Permalink
fix: Validate slm_image.exposure > 0 (#211)
Browse files Browse the repository at this point in the history
* copy pattern from camera exposure

* style(pre-commit.ci): auto fixes [...]

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
hinderling and pre-commit-ci[bot] authored Nov 27, 2024
1 parent 4b42d1e commit 0199fa3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/useq/_mda_event.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ class SLMImage(UseqModel):

data: Any = Field(..., repr=False)
device: Optional[str] = None
exposure: Optional[float] = None
exposure: Optional[float] = Field(default=None, gt=0.0)

@model_validator(mode="before")
def _cast_data(cls, v: Any) -> Any:
Expand Down

0 comments on commit 0199fa3

Please sign in to comment.