devices: Don't truncate device UUID to 7 chars when --json is used

Change-type: patch
This commit is contained in:
Paulo Castro 2020-12-03 20:54:08 +00:00
parent 0bae6546f2
commit aae6aff3e9

View File

@ -101,7 +101,7 @@ export default class DevicesCmd extends Command {
const belongsToApplication = device.belongs_to__application as Application[];
device.application_name = belongsToApplication?.[0]?.app_name || null;
device.uuid = device.uuid.slice(0, 7);
device.uuid = options.json ? device.uuid : device.uuid.slice(0, 7);
device.device_type = device.is_of__device_type?.[0]?.slug || null;
return device;