From b10ed84836670ea1b74c266614666ed4e123ddf3 Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Fri, 23 Oct 2020 10:27:16 +0200 Subject: [PATCH] adding columns rate when no there are rate --- ereuse_devicehub/resources/documents/device_row.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ereuse_devicehub/resources/documents/device_row.py b/ereuse_devicehub/resources/documents/device_row.py index f46b931d..70e7bfda 100644 --- a/ereuse_devicehub/resources/documents/device_row.py +++ b/ereuse_devicehub/resources/documents/device_row.py @@ -95,6 +95,15 @@ class DeviceRow(OrderedDict): self['RAM Range'] = rate.ram_range.name self['Data Storage Rate'] = rate.data_storage self['Data Storage Range'] = rate.data_storage_range.name + else: + self['Device Rate'] = '' + self['Device Range'] = '' + self['Processor Rate'] = '' + self['Processor Range'] = '' + self['RAM Rate'] = '' + self['RAM Range'] = '' + self['Data Storage Rate'] = '' + self['Data Storage Range'] = '' self['Price'] = none2str(device.price)