From 8731d90d9ae63a8bd6d6095634ae6f8966d3739b Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Wed, 26 May 2021 11:43:53 +0200 Subject: [PATCH] add lots in csv of devices --- ereuse_devicehub/resources/documents/device_row.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ereuse_devicehub/resources/documents/device_row.py b/ereuse_devicehub/resources/documents/device_row.py index e2128bc4..875906d7 100644 --- a/ereuse_devicehub/resources/documents/device_row.py +++ b/ereuse_devicehub/resources/documents/device_row.py @@ -44,8 +44,10 @@ class DeviceRow(OrderedDict): # General information about device self['DevicehubID'] = device.devicehub_id self['DocumentID'] = self.document_id - self['Public Link'] = '{url}{id}'.format(url=url_for('Device.main', _external=True), - id=device.devicehub_id) + self['Public Link'] = '{url}{id}'.format( + url=url_for('Device.main', _external=True), + id=device.devicehub_id) + self['Lots'] = ', '.join([x.name for x in self.device.lots]) self['Tag 1 Type'] = self['Tag 1 ID'] = self['Tag 1 Organization'] = '' self['Tag 2 Type'] = self['Tag 2 ID'] = self['Tag 2 Organization'] = '' self['Tag 3 Type'] = self['Tag 3 ID'] = self['Tag 3 Organization'] = ''