diff options
Diffstat (limited to 'admin/WebConsole3/frontend/src/app/serializer/client.serializer.ts')
-rw-r--r-- | admin/WebConsole3/frontend/src/app/serializer/client.serializer.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/admin/WebConsole3/frontend/src/app/serializer/client.serializer.ts b/admin/WebConsole3/frontend/src/app/serializer/client.serializer.ts index 9ee7427f..3b893ada 100644 --- a/admin/WebConsole3/frontend/src/app/serializer/client.serializer.ts +++ b/admin/WebConsole3/frontend/src/app/serializer/client.serializer.ts @@ -5,11 +5,11 @@ export class ClientSerializer extends Serializer { toJson(client: Client): any { // @ts-ignore - client.repository = (typeof client.repository === 'object') ? client.repository.id : client.repository; + client.repository = (client.repository && typeof client.repository === 'object') ? client.repository.id : client.repository; // @ts-ignore client.hardwareProfile = (client.hardwareProfile) ? client.hardwareProfile.id : null; // @ts-ignore - client.netboot = (typeof client.netboot === 'object') ? client.netboot.id : client.netboot; + client.netboot = (client.netboot && typeof client.netboot === 'object') ? client.netboot.id : client.netboot; return super.toJson(client); } } |