From 08f96d9eb8008657caf99d5bfac3ba428e7e307f Mon Sep 17 00:00:00 2001 From: Bai Date: Wed, 12 Apr 2023 18:13:55 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E6=89=A7=E8=A1=8C?= =?UTF-8?q?=E6=89=B9=E9=87=8F=E5=91=BD=E4=BB=A4=E6=97=B6=E6=8A=A5=E9=94=99?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98=20TypeError:set=20obiect=20is=20not?= =?UTF-8?q?=20subscriptable?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/ops/models/job.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/ops/models/job.py b/apps/ops/models/job.py index 3d631c06b..c41432a96 100644 --- a/apps/ops/models/job.py +++ b/apps/ops/models/job.py @@ -47,7 +47,8 @@ class JMSPermedInventory(JMSInventory): self.assets_accounts_mapper = self.get_assets_accounts_mapper() def get_asset_sorted_accounts(self, asset): - return self.assets_accounts_mapper.get(asset.id, []) + accounts = self.assets_accounts_mapper.get(asset.id, []) + return list(accounts) def get_assets_accounts_mapper(self): mapper = defaultdict(set)