diff --git a/bittensor/core/subtensor.py b/bittensor/core/subtensor.py index 94dd6c4438..33dd75dbf6 100644 --- a/bittensor/core/subtensor.py +++ b/bittensor/core/subtensor.py @@ -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(