fix: question request deletion

This commit is contained in:
trisua 2025-05-06 23:16:45 -04:00
parent 687766f5ee
commit 797231946a
2 changed files with 12 additions and 4 deletions

View file

@ -425,8 +425,16 @@ pub async fn requests_request(
q.push(match data.0.get_question_by_id(req.linked_asset).await {
Ok(p) => p,
Err(e) => {
return Err(Html(render_error(e, &jar, &data, &Some(user)).await));
Err(_) => {
if let Err(e) = data
.0
.delete_request(req.id, req.linked_asset, &user, true)
.await
{
return Err(Html(render_error(e, &jar, &data, &Some(user)).await));
}
continue;
}
});
}