diff --git a/device/models.py b/device/models.py index da53de8..a351a11 100644 --- a/device/models.py +++ b/device/models.py @@ -108,6 +108,22 @@ class Device: return annotation = annotations.first() self.last_evidence = Evidence(annotation.uuid) + + def is_eraseserver(self): + if not self.uuids: + self.get_uuids() + if not self.uuids: + return False + + annotation = Annotation.objects.filter( + uuid__in=self.uuids, + owner=self.owner, + type=Annotation.Type.ERASE_SERVER + ).first() + + if annotation: + return True + return False def last_uuid(self): return self.uuids[0] diff --git a/device/templates/details.html b/device/templates/details.html index 51e97f1..d0e9c02 100644 --- a/device/templates/details.html +++ b/device/templates/details.html @@ -12,22 +12,22 @@