Skip to content

Commit c3c91c3

Browse files
committed
fix: handle potential null values in app/data-structures directory
Signed-off-by: pierre santamaria <[email protected]>
1 parent a4b010c commit c3c91c3

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/app/data-structures/business.data.structures.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,9 +128,9 @@ export interface TrainrunSectionDto {
128128
trainrunId: number; // reference to the trainrun (main object)
129129
resourceId: number; // reference to the algined (resource - not yet implemented)
130130

131-
specificTrainrunSectionFrequencyId: number; // Default 0 - deprecate???
131+
specificTrainrunSectionFrequencyId: number | null; // Default 0 - deprecate???
132132
path: PathDto; // cached - precomputed path for rendering
133-
warnings: WarningDto[]; // business logic failures - warnings storage
133+
warnings: WarningDto[] | null; // business logic failures - warnings storage
134134
}
135135

136136
/**
@@ -183,7 +183,7 @@ export interface NodeDto {
183183
connectionTime: number; // aka Umsteigezeit - time used to change train in minutes
184184
trainrunCategoryHaltezeiten: TrainrunCategoryHaltezeit; // user can over-write the halte times
185185
symmetryAxis: number; // deprecate ???
186-
warnings: WarningDto[]; // business logic failures - warnings storage
186+
warnings: WarningDto[] | null; // business logic failures - warnings storage
187187

188188
labelIds: number[]; // list of assigned filterable labels (identifiers: See Label, LabelDto.)
189189
}

src/app/data-structures/technical.data.structures.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,8 @@ export interface TimeLockDto {
101101
time: number; // minutes [0..60]
102102
consecutiveTime: number; // automatically updated after any data changes in the application
103103
lock: boolean; // used to stop the time propagation (forward/backward)
104-
warning: WarningDto; // warning - if business logic detects an issue -> set human-readable warning
105-
timeFormatter: TimeFormatter; // undefined or object - optional
104+
warning: WarningDto | null; // warning - if business logic detects an issue -> set human-readable warning
105+
timeFormatter: TimeFormatter | null; // undefined or object - optional
106106
}
107107

108108
/**

0 commit comments

Comments
 (0)