Skip to content
Snippets Groups Projects
Commit 443b946f authored by Marc Hanisch's avatar Marc Hanisch
Browse files

allow null for location

parent 7021b746
No related branches found
No related tags found
1 merge request!33Feature configuration models
......@@ -10,7 +10,7 @@ export interface IConfiguration {
id: number | null
startDate: Date | null
endDate: Date | null
location: IStationaryLocation | IDynamicLocation
location: IStationaryLocation | IDynamicLocation | null
contacts: IContact[]
children: ConfigurationsTreeNode[]
platformAttributes: PlatformConfigurationAttributes[]
......@@ -21,7 +21,7 @@ export class Configuration implements IConfiguration, IPathSetter {
private _id: number | null = null
private _startDate: Date | null = null
private _endDate: Date | null = null
private _location: IStationaryLocation | IDynamicLocation = new StationaryLocation()
private _location: IStationaryLocation | IDynamicLocation | null = null
private _contacts: IContact[] = [] as IContact[]
private _tree: ConfigurationsTree = new ConfigurationsTree()
private _platformAttributes: PlatformConfigurationAttributes[] = [] as PlatformConfigurationAttributes[]
......@@ -51,11 +51,11 @@ export class Configuration implements IConfiguration, IPathSetter {
this._endDate = date
}
get location (): IStationaryLocation | IDynamicLocation {
get location (): IStationaryLocation | IDynamicLocation | null {
return this._location
}
set location (location: IStationaryLocation | IDynamicLocation) {
set location (location: IStationaryLocation | IDynamicLocation | null) {
this._location = location
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment