Update PostScheduledNoteProcessorService.ts

This commit is contained in:
syuilo 2025-09-24 09:45:38 +09:00
parent 92e24125db
commit 8b41db3f8f
1 changed files with 2 additions and 2 deletions

View File

@ -31,8 +31,8 @@ export class PostScheduledNoteProcessorService {
@bindThis @bindThis
public async process(job: Bull.Job<PostScheduledNoteJobData>): Promise<void> { public async process(job: Bull.Job<PostScheduledNoteJobData>): Promise<void> {
const draft = await this.noteDraftsRepository.findOneBy({ id: job.data.noteDraftId }); const draft = await this.noteDraftsRepository.findOne({ where: { id: job.data.noteDraftId }, relations: ['user'] });
if (draft == null) { if (draft == null || draft.user == null || draft.scheduledAt == null) {
return; return;
} }