Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Fix] Fix create new APP flow failing #263

Merged
merged 1 commit into from
Aug 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions lib/applications/resolvers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,8 @@ export const createNewApplication: Resolver<
const physicianAssessment = {
disability,
disabilityCertificationDate,
mobilityAids,
otherMobilityAids,
patientCondition,
otherPatientCondition,
permitType: input.permitType,
Expand Down Expand Up @@ -352,7 +354,6 @@ export const createNewApplication: Resolver<
billingCountry: input.billingCountry,
billingPostalCode,
};

try {
await createNewRequestFormSchema.validate({
permitHolder,
Expand All @@ -372,7 +373,7 @@ export const createNewApplication: Resolver<
}

// Unknown error
logger.error({ error: err }, 'Unknown error');
logger.error({ error: (err as any).message }, 'Unknown error');
throw new ApolloError('Application was unable to be created');
}

Expand Down
2 changes: 1 addition & 1 deletion tools/admin/requests/create-new.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ export const INITIAL_PERMIT_HOLDER_INFORMATION: NewApplicationPermitHolderInform
// Initial data for physician assessment in application forms
export const INITIAL_PHYSICIAN_ASSESSMENT: PhysicianAssessment = {
disability: '',
patientCondition: null,
patientCondition: [],
permitType: null,
disabilityCertificationDate: '',
otherPatientCondition: null,
Expand Down