From 0041519775e5634179dcea3b27f01a1deeba2718 Mon Sep 17 00:00:00 2001 From: Birloi Florian Date: Tue, 20 Aug 2024 17:44:12 +0300 Subject: [PATCH] fix: 347 - 500 code error while updateing an eventless activity log --- .../src/usecases/activity-log/update-activity-log.usecase.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/usecases/activity-log/update-activity-log.usecase.ts b/backend/src/usecases/activity-log/update-activity-log.usecase.ts index c0a03cfc5..6713ccd06 100644 --- a/backend/src/usecases/activity-log/update-activity-log.usecase.ts +++ b/backend/src/usecases/activity-log/update-activity-log.usecase.ts @@ -50,7 +50,7 @@ export class UpdateActivityLogUsecase if (updates.activityTypeId) { const taskExists = await this.activityTypeFacade.exists( [updates.activityTypeId], - { organizationId: log.event.organization.id }, + { organizationId: log.event?.organization.id || log.organization.id }, // in case the organization doesn't have an event associated with it ); if (!taskExists) { this.exceptionService.badRequestException(