Skip to content

Commit

Permalink
fix(cb2-12009): default psv body model to null if its an empty string (
Browse files Browse the repository at this point in the history
…#1493)

* fix(cb2-12009): default psv body model to null if its an empty string

* fix(cb2-12009): add snyk ignore

* fix(cb2-12009): correct snyk ignore indentation

* fix(cb2-12009): add package number to snyk ignore
  • Loading branch information
pbardy2000 authored May 24, 2024
1 parent b15764f commit 36963fb
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 3 deletions.
23 changes: 23 additions & 0 deletions .snyk
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Snyk (https://snyk.io) policy file, patches or ignores known vulnerabilities.
version: v1.25.0

# TEMPLATE that can be used inside the `ignore section`
# SNYK-LANG-PKG-NUM:
# - '*':
# reason: Remediation not yet available
# expires: 2023-08-27T09:01:15.119Z
# created: 2022-08-08T09:01:15.122Z

# ignores vulnerabilities until expiry date; change duration by modifying expiry date
ignore:
SNYK-JS-BRACES-6838727:
- '*':
reason: Remediation not yet available
expires: 2024-11-24T09:01:15.119Z
created: 2024-05-24T09:01:15.122Z
SNYK-JS-MICROMATCH-6838728:
- '*':
reason: Remediation not yet available
expires: 2024-11-24T09:01:15.119Z
created: 2024-05-24T09:01:15.122Z
patch: {}
2 changes: 1 addition & 1 deletion src/app/models/test-results/test-result.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export interface TestResultModel {
testStatus?: TestResultStatus;

make?: string;
model?: string;
model?: string | null;
bodyType?: TechRecordBodyType;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ export function getBodyMake(techRecord: V3TechRecordModel | undefined) {

export function getBodyModel(techRecord: V3TechRecordModel | undefined) {
if (techRecord?.techRecord_vehicleType === 'psv') {
return techRecord.techRecord_bodyModel;
return techRecord.techRecord_bodyModel ? techRecord.techRecord_bodyModel : null;
}

if (techRecord?.techRecord_vehicleType === 'hgv' || techRecord?.techRecord_vehicleType === 'trl') {
Expand Down
2 changes: 1 addition & 1 deletion src/app/services/test-records/test-records.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ export class TestRecordsService {
}

private canHandleTestType(templateMap: Record<VehicleTypes, Record<string, Record<string, FormNode>>>) {
return function handleTestType <T>(source: Observable<T>): Observable<boolean> {
return function handleTestType<T>(source: Observable<T>): Observable<boolean> {
const handle = (testResult: TestResultModel | undefined): boolean => {
if (!testResult) {
return false;
Expand Down

0 comments on commit 36963fb

Please sign in to comment.