From aa744c0fec747e97ace2c41e114347f3ebc4f1df Mon Sep 17 00:00:00 2001 From: Bai Date: Wed, 19 Jul 2023 10:33:12 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E8=B4=A6=E5=8F=B7?= =?UTF-8?q?=E6=A8=A1=E7=89=88=E5=88=87=E6=8D=A2=E6=97=B6=E6=8A=A5=E9=94=99?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/accounts/models/account.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/accounts/models/account.py b/apps/accounts/models/account.py index 893fcccb4..5130a59c0 100644 --- a/apps/accounts/models/account.py +++ b/apps/accounts/models/account.py @@ -140,7 +140,10 @@ class AccountTemplate(BaseAccount): def get_su_from_account_templates(cls, pk=None): if pk is None: return cls.objects.all() - return cls.objects.exclude(Q(id=pk) | Q(_id=pk)) + return cls.objects.exclude(Q(id=pk) | Q(su_from_id=pk)) + + def __str__(self): + return f'{self.name}({self.username})' def get_su_from_account(self, asset): su_from = self.su_from