Skip to content

Commit 20a5661

Browse files
Merge branch 'main' into MI-1067-update-user-profile
2 parents 8ecc2b0 + 6ed3408 commit 20a5661

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

src/common/schema/profile.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export const userExperienceInputBaseSchema = z.object({
1515
description: z.string().max(5000).optional(),
1616
subtitle: z.string().max(1000).optional(),
1717
startedAt: z.date(),
18-
endedAt: z.date().optional(),
18+
endedAt: z.date().optional().nullable().default(null),
1919
companyId: z.string().nullable().optional().default(null),
2020
customCompanyName: z
2121
.string()

src/schema/profile.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ import {
2626
getNonExistingSkills,
2727
insertOrIgnoreUserExperienceSkills,
2828
} from '../entity/user/experiences/UserExperienceSkill';
29-
3029
interface GQLUserExperience {
3130
id: string;
3231
type: UserExperienceType;
@@ -184,9 +183,7 @@ const generateExperienceToSave = async <
184183
where: { id: companyId },
185184
});
186185
toSave.customCompanyName = null;
187-
}
188-
189-
if (customCompanyName) {
186+
} else if (customCompanyName) {
190187
const existingCompany = await ctx.con
191188
.getRepository(Company)
192189
.createQueryBuilder('c')

0 commit comments

Comments
 (0)