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

@ -441,13 +441,13 @@ impl DataManager {
// delete request (if it exists and question isn't global)
if !y.is_global
&& self
.get_request_by_id_linked_asset(y.owner, y.id)
.get_request_by_id_linked_asset(y.id, y.id)
.await
.is_ok()
{
// requests are also deleted when a post is created answering the given question
// (unless the question is global)
self.delete_request(y.owner, y.id, user, false).await?;
self.delete_request(y.id, y.id, user, false).await?;
}
// delete all posts answering question