Skip to content

Commit 290bdce

Browse files
committed
Correct update fields to have null type where nulls are actually allowed/expected
1 parent 515676b commit 290bdce

File tree

7 files changed

+19
-19
lines changed

7 files changed

+19
-19
lines changed

src/components/ceremony/dto/update-ceremony.dto.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ export abstract class UpdateCeremony {
1313
readonly planned?: boolean;
1414

1515
@DateField({ nullable: true })
16-
readonly estimatedDate?: CalendarDate;
16+
readonly estimatedDate?: CalendarDate | null;
1717

1818
@DateField({ nullable: true })
19-
readonly actualDate?: CalendarDate;
19+
readonly actualDate?: CalendarDate | null;
2020
}
2121

2222
@InputType()

src/components/engagement/dto/update-engagement.dto.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ export abstract class UpdateLanguageEngagement extends UpdateEngagement {
5858
@Field({ nullable: true })
5959
readonly openToInvestorVisit?: boolean;
6060

61-
@Field({ nullable: true })
62-
readonly paratextRegistryId?: string;
61+
@Field(() => String, { nullable: true })
62+
readonly paratextRegistryId?: string | null;
6363

6464
@Field({ nullable: true })
6565
@Type(() => CreateDefinedFileVersionInput)
@@ -76,8 +76,8 @@ export abstract class UpdateLanguageEngagement extends UpdateEngagement {
7676
})
7777
readonly methodology?: ProductMethodology;
7878

79-
@Field({ nullable: true })
80-
readonly historicGoal?: string;
79+
@Field(() => String, { nullable: true })
80+
readonly historicGoal?: string | null;
8181

8282
@Field(() => LanguageMilestone, { nullable: true })
8383
readonly milestoneReached?: LanguageMilestone;

src/components/location/dto/update-location.dto.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { Field, InputType, ObjectType } from '@nestjs/graphql';
22
import { Type } from 'class-transformer';
33
import { ValidateNested } from 'class-validator';
4-
import { ID, IdField, IdOf, ISO31661Alpha3, NameField } from '~/common';
4+
import { ID, IdField, ISO31661Alpha3, NameField } from '~/common';
55
import { Transform } from '~/common/transform.decorator';
66
import { CreateDefinedFileVersionInput } from '../../file/dto';
77
import { LocationType } from './location-type.enum';
@@ -33,7 +33,7 @@ export abstract class UpdateLocation {
3333
readonly defaultFieldRegionId?: ID | null;
3434

3535
@IdField({ nullable: true })
36-
readonly defaultMarketingRegionId?: IdOf<Location>;
36+
readonly defaultMarketingRegionId?: ID<Location> | null;
3737

3838
@Field({ nullable: true })
3939
@Type(() => CreateDefinedFileVersionInput)

src/components/organization/dto/update-organization.dto.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ export abstract class UpdateOrganization {
1717
@NameField({ nullable: true })
1818
readonly acronym?: string | null;
1919

20-
@Field({ nullable: true })
21-
readonly address?: string;
20+
@Field(() => String, { nullable: true })
21+
readonly address?: string | null;
2222

2323
@Field(() => [OrganizationType], { nullable: true })
2424
readonly types?: readonly OrganizationType[];

src/components/partner/dto/update-partner.dto.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export abstract class UpdatePartner {
2222
readonly id: ID;
2323

2424
@IdField({ nullable: true })
25-
readonly pointOfContactId?: ID | null;
25+
readonly pointOfContactId?: ID<'User'> | null;
2626

2727
@Field(() => [PartnerType], { nullable: true })
2828
@Transform(({ value }) => uniq(value))
@@ -32,11 +32,11 @@ export abstract class UpdatePartner {
3232
@Transform(({ value }) => uniq(value))
3333
readonly financialReportingTypes?: readonly FinancialReportingType[];
3434

35-
@Field({ nullable: true })
35+
@Field(() => String, { nullable: true })
3636
@Matches(/^[A-Z]{3}$/, {
3737
message: 'Must be 3 uppercase letters',
3838
})
39-
readonly pmcEntityCode?: string;
39+
readonly pmcEntityCode?: string | null;
4040

4141
@Field({ nullable: true })
4242
readonly globalInnovationsClient?: boolean;
@@ -45,7 +45,7 @@ export abstract class UpdatePartner {
4545
readonly active?: boolean;
4646

4747
@NameField({ nullable: true })
48-
readonly address?: string;
48+
readonly address?: string | null;
4949

5050
@IdField({ nullable: true })
5151
readonly languageOfWiderCommunicationId?: ID<'Language'> | null;

src/components/partnership/dto/update-partnership.dto.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@ export abstract class UpdatePartnership {
3232
readonly mouStatus?: PartnershipAgreementStatus;
3333

3434
@DateField({ nullable: true })
35-
readonly mouStartOverride?: CalendarDate;
35+
readonly mouStartOverride?: CalendarDate | null;
3636

3737
@DateField({ nullable: true })
38-
readonly mouEndOverride?: CalendarDate;
38+
readonly mouEndOverride?: CalendarDate | null;
3939

4040
@Field(() => [PartnerType], { nullable: true })
4141
@Transform(({ value }) => uniq(value))

src/components/periodic-report/dto/update-periodic-report.dto.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ export abstract class UpdatePeriodicReportInput {
1818
readonly reportFile?: CreateDefinedFileVersionInput;
1919

2020
@DateField({ nullable: true })
21-
readonly receivedDate?: CalendarDate;
21+
readonly receivedDate?: CalendarDate | null;
2222

23-
@Field({
23+
@Field(() => String, {
2424
description: 'Why this report is skipped',
2525
nullable: true,
2626
})
27-
readonly skippedReason?: string;
27+
readonly skippedReason?: string | null;
2828
}

0 commit comments

Comments
 (0)