fix: Allow soft-deleted records to be queried from RevisionProcessor
closes #3706
This commit is contained in:
@@ -14,7 +14,9 @@ export default class RevisionsProcessor extends BaseProcessor {
|
||||
switch (event.name) {
|
||||
case "documents.publish":
|
||||
case "documents.update.debounced": {
|
||||
const document = await Document.findByPk(event.documentId);
|
||||
const document = await Document.findByPk(event.documentId, {
|
||||
paranoid: false,
|
||||
});
|
||||
invariant(document, "Document should exist");
|
||||
const previous = await Revision.findLatest(document.id);
|
||||
|
||||
@@ -28,7 +30,9 @@ export default class RevisionsProcessor extends BaseProcessor {
|
||||
return;
|
||||
}
|
||||
|
||||
const user = await User.findByPk(event.actorId);
|
||||
const user = await User.findByPk(event.actorId, {
|
||||
paranoid: false,
|
||||
});
|
||||
invariant(user, "User should exist");
|
||||
await revisionCreator({
|
||||
user,
|
||||
|
||||
Reference in New Issue
Block a user