fix: delete attachments by used_for.id and add corresponding index

This commit is contained in:
Paul Makles
2024-09-29 15:05:56 +01:00
parent 3080ec1f5a
commit cbf9e81256
4 changed files with 30 additions and 2 deletions

View File

@@ -260,7 +260,7 @@ impl MongoDb {
// Update many attachments with parent id.
self.delete_many_attachments(doc! {
"object_id": &server_id
"used_for.id": &server_id
})
.await?;