Skip to content

Commit

Permalink
Update bittensor/core/subtensor.py
Browse files Browse the repository at this point in the history
Co-authored-by: Benjamin Himes <37844818+thewhaleking@users.noreply.github.com>
  • Loading branch information
andreea-popescu-reef and thewhaleking authored Nov 20, 2024
1 parent 90fc086 commit 1e57dc2
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions bittensor/core/subtensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -1196,12 +1196,12 @@ def get_neuron_certificate(
block=block,
params=[netuid, hotkey],
)
if not hasattr(certificate, "serialize"):
return None
certificate = certificate.serialize()
if not certificate:
try:
serialized_certificate = certificate.serialize()
if serialized_certificate:
return serialized_certificate.get("certificate", None)
except AttributeError:
return None
return certificate.get("certificate", None)

@networking.ensure_connected
def neuron_for_uid(
Expand Down

0 comments on commit 1e57dc2

Please sign in to comment.