Update PostScheduledNoteProcessorService.ts
This commit is contained in:
parent
92e24125db
commit
8b41db3f8f
|
@ -31,8 +31,8 @@ export class PostScheduledNoteProcessorService {
|
|||
|
||||
@bindThis
|
||||
public async process(job: Bull.Job<PostScheduledNoteJobData>): Promise<void> {
|
||||
const draft = await this.noteDraftsRepository.findOneBy({ id: job.data.noteDraftId });
|
||||
if (draft == null) {
|
||||
const draft = await this.noteDraftsRepository.findOne({ where: { id: job.data.noteDraftId }, relations: ['user'] });
|
||||
if (draft == null || draft.user == null || draft.scheduledAt == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue