diff --git a/ereuse_devicehub/resources/device/models.py b/ereuse_devicehub/resources/device/models.py index 18487ba5..8b2fb93b 100644 --- a/ereuse_devicehub/resources/device/models.py +++ b/ereuse_devicehub/resources/device/models.py @@ -401,6 +401,12 @@ class Device(Thing): return history + @property + def sid(self): + actions = [x for x in self.actions if x.t == 'Snapshot' and x.sid] + if actions: + return actions[0] + @property def tradings(self): return {str(x.id): self.trading(x.lot) for x in self.actions if x.t == 'Trade'} diff --git a/ereuse_devicehub/templates/labels/print_labels.html b/ereuse_devicehub/templates/labels/print_labels.html index 3c9ffaae..07b8c113 100644 --- a/ereuse_devicehub/templates/labels/print_labels.html +++ b/ereuse_devicehub/templates/labels/print_labels.html @@ -35,7 +35,8 @@