summaryrefslogtreecommitdiffstats
path: root/src/warning/routes.rs
diff options
context:
space:
mode:
authorSanto Cariotti <santo@dcariotti.me>2022-10-17 20:58:40 +0000
committerSanto Cariotti <santo@dcariotti.me>2022-10-17 20:58:40 +0000
commitbf6feab9cac0bbf54607ba3401a5116440abcf85 (patch)
treeb33e41d6b833a24afec17945a26cd2848e3578b8 /src/warning/routes.rs
parentfc296356c4e1b269fd55196e72791ea3fbf03b08 (diff)
Fix: edit warning for resolved_by already defined as number
Diffstat (limited to 'src/warning/routes.rs')
-rw-r--r--src/warning/routes.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/warning/routes.rs b/src/warning/routes.rs
index e57b8a8..bb08963 100644
--- a/src/warning/routes.rs
+++ b/src/warning/routes.rs
@@ -101,7 +101,7 @@ async fn edit_warning(
return Err(AppError::Unauthorized);
}
- if payload.resolved_by.is_none() || payload.resolved_by.unwrap() {
+ if payload.resolved_by.is_none() || payload.resolved_by.unwrap() > 0 {
warning.edit(Some(user.id), payload).await?;
} else {
warning.edit(None, payload).await?;