Fix closing reports not marking the report as closed (#690)

Co-authored-by: Geometrically <18202329+Geometrically@users.noreply.github.com>
This commit is contained in:
Emma Alexia Triphora 2023-08-21 10:43:06 -04:00 committed by GitHub
parent 13e5644c89
commit c85f12fe2c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 25 additions and 0 deletions

View File

@ -5432,6 +5432,19 @@
},
"query": "\n SELECT name FROM report_types\n "
},
"e37ecb6dc1509d390bb6f68ba25899d19f693554d8969bbf8f8ee14a78adf0f9": {
"describe": {
"columns": [],
"nullable": [],
"parameters": {
"Left": [
"Bool",
"Int8"
]
}
},
"query": "\n UPDATE threads\n SET show_in_mod_inbox = $1\n WHERE id = $2\n "
},
"e3cc1fd070b97c4cc36bdb2f33080d4e0d7f3c3d81312d9d28a8c3c8213ad54b": {
"describe": {
"columns": [],

View File

@ -409,6 +409,18 @@ pub async fn report_edit(
)
.execute(&mut *transaction)
.await?;
sqlx::query!(
"
UPDATE threads
SET show_in_mod_inbox = $1
WHERE id = $2
",
!(edit_closed || report.closed),
report.thread_id.0,
)
.execute(&mut *transaction)
.await?;
}
transaction.commit().await?;