From ff85620e9e20b17360492a951e77b3cc44bc2407 Mon Sep 17 00:00:00 2001 From: niljub Date: Mon, 19 Aug 2024 19:40:37 +0200 Subject: [PATCH] changed the get_subnets function --- bittensor/subtensor.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/bittensor/subtensor.py b/bittensor/subtensor.py index 403e63f11e..f9b27cb93a 100644 --- a/bittensor/subtensor.py +++ b/bittensor/subtensor.py @@ -4254,9 +4254,8 @@ def get_subnets(self, block: Optional[int] = None) -> List[int]: """ result = self.query_map_subtensor("NetworksAdded", block) subnets = [] - if result and hasattr(result, "records"): - for record in result.records: - subnets.append(record[0].value) + for data in result: + subnets.append(data[0]) return subnets def get_all_subnets_info(self, block: Optional[int] = None) -> List[SubnetInfo]: