Skip to content

Commit e57b10d

Browse files
CarsonFbryanjnelson
andcommitted
Mark engagement files as nullable
Co-authored-by: Bryan Nelson <[email protected]>
1 parent 7652fa1 commit e57b10d

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/components/engagement/dto/engagement.dto.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ export class LanguageEngagement extends Engagement {
183183
@Field()
184184
readonly paratextRegistryId: SecuredString;
185185

186-
readonly pnp: Secured<LinkTo<'File'>>;
186+
readonly pnp: Secured<LinkTo<'File'> | null>;
187187

188188
@Field()
189189
readonly historicGoal: SecuredString;
@@ -219,7 +219,7 @@ export class InternshipEngagement extends Engagement {
219219
@DbLabel('ProductMethodology')
220220
readonly methodologies: SecuredMethodologies;
221221

222-
readonly growthPlan: Secured<LinkTo<'File'>>;
222+
readonly growthPlan: Secured<LinkTo<'File'> | null>;
223223
}
224224

225225
export const engagementRange = (engagement: UnsecuredDto<Engagement>) =>

src/components/file/file.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -524,7 +524,7 @@ export class FileService {
524524
async updateDefinedFile<
525525
Input extends CreateDefinedFileVersionInput | undefined,
526526
>(
527-
file: Secured<FileId | LinkTo<'File'>>,
527+
file: Secured<FileId | LinkTo<'File'> | null>,
528528
field: string,
529529
input: Input,
530530
session: Session,

src/components/product/handlers/extract-products-from-pnp.handler.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export class ExtractProductsFromPnpHandler
2828
? event.engagement
2929
: event.updated;
3030
const { pnp: hasPnpInput, methodology } = event.input;
31-
if (!hasPnpInput || !methodology) {
31+
if (!engagement.pnp || !hasPnpInput || !methodology) {
3232
return;
3333
}
3434
const availableSteps = getAvailableSteps({ methodology });

0 commit comments

Comments
 (0)