From d563216e3f479974f38b0243fc65c374ab3dafcb Mon Sep 17 00:00:00 2001 From: BaiJiangJie Date: Fri, 21 Jun 2019 10:59:08 +0800 Subject: [PATCH] =?UTF-8?q?[Bugfix]=20=E4=BF=AE=E5=A4=8D=E8=B5=84=E4=BA=A7?= =?UTF-8?q?=E6=B2=A1=E6=9C=89=E7=AE=A1=E7=90=86=E7=94=A8=E6=88=B7=E6=97=B6?= =?UTF-8?q?=E8=8E=B7=E5=8F=96connectivity=E5=AD=97=E6=AE=B5=E5=A4=B1?= =?UTF-8?q?=E8=B4=A5=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/assets/models/asset.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/apps/assets/models/asset.py b/apps/assets/models/asset.py index 4f7509d4f..3b9fef85e 100644 --- a/apps/assets/models/asset.py +++ b/apps/assets/models/asset.py @@ -250,6 +250,8 @@ class Asset(OrgModelMixin): @property def connectivity(self): + if not self.admin_user: + return self.UNKNOWN return self.admin_user.get_connectivity_of(self) @connectivity.setter