From 02a4187c396ba275038eef44254a8b642e7fe07c Mon Sep 17 00:00:00 2001 From: traxys Date: Fri, 30 Jun 2023 20:27:19 +0200 Subject: [PATCH] server: Fixup person count range --- src/routes/recipe.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/routes/recipe.rs b/src/routes/recipe.rs index bac1a5b..7fcfb12 100644 --- a/src/routes/recipe.rs +++ b/src/routes/recipe.rs @@ -32,7 +32,7 @@ pub(super) async fn create_recipe( ranking: ActiveValue::Set(request.rating as i32), household: ActiveValue::Set(household.id), 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() };