Skip to content

Commit

Permalink
changed the get_subnets function
Browse files Browse the repository at this point in the history
  • Loading branch information
niljub committed Aug 19, 2024
1 parent 65aa008 commit ff85620
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions bittensor/subtensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]:
Expand Down

0 comments on commit ff85620

Please sign in to comment.