Update PostScheduledNoteProcessorService.ts
This commit is contained in:
parent
92e24125db
commit
8b41db3f8f
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue