server: Fixup person count range
This commit is contained in:
parent
840afc7ef4
commit
02a4187c39
1 changed files with 1 additions and 1 deletions
|
|
@ -32,7 +32,7 @@ pub(super) async fn create_recipe(
|
||||||
ranking: ActiveValue::Set(request.rating as i32),
|
ranking: ActiveValue::Set(request.rating as i32),
|
||||||
household: ActiveValue::Set(household.id),
|
household: ActiveValue::Set(household.id),
|
||||||
steps: ActiveValue::Set(request.steps),
|
steps: ActiveValue::Set(request.steps),
|
||||||
person_count: ActiveValue::Set(request.person_count.min(1) as i32),
|
person_count: ActiveValue::Set(request.person_count.max(1) as i32),
|
||||||
..Default::default()
|
..Default::default()
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue