fix: Documents in trash should still load their attachments

closes #1896
This commit is contained in:
Tom Moor
2021-02-20 13:22:02 -08:00
parent e66611e771
commit c79cfbd30d
2 changed files with 26 additions and 0 deletions

View File

@ -139,6 +139,7 @@ router.post("attachments.redirect", auth(), async (ctx) => {
if (attachment.documentId) {
const document = await Document.findByPk(attachment.documentId, {
userId: user.id,
paranoid: false,
});
authorize(user, "read", document);
}