fix: correct pulse range value
This commit is contained in:
parent
a66d8f9e8e
commit
79653baae5
@ -330,7 +330,7 @@ def list_pulse(request: HttpRequest, days: int = 90):
|
|||||||
@router.post("/pulse", response=PulseOut)
|
@router.post("/pulse", response=PulseOut)
|
||||||
def record_pulse(request: HttpRequest, payload: PulseIn):
|
def record_pulse(request: HttpRequest, payload: PulseIn):
|
||||||
"""One reading per day: posting twice for the same day overwrites it."""
|
"""One reading per day: posting twice for the same day overwrites it."""
|
||||||
if not 20 <= payload.bpm <= 400:
|
if not 10 <= payload.bpm <= 400:
|
||||||
raise HttpError(422, "A pulse of that value is not plausible for a cat.")
|
raise HttpError(422, "A pulse of that value is not plausible for a cat.")
|
||||||
|
|
||||||
day = payload.date or timezone.localdate()
|
day = payload.date or timezone.localdate()
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user