diff --git a/ereuse_devicehub/resources/action/models.py b/ereuse_devicehub/resources/action/models.py index ded44190..b486e2bd 100644 --- a/ereuse_devicehub/resources/action/models.py +++ b/ereuse_devicehub/resources/action/models.py @@ -513,7 +513,7 @@ class EraseBasic(JoinedWithOneDeviceMixin, ActionWithOneDevice): result = api.generate_proof(deviceCHID, docID, docSig, issuerID, proof_type) from ereuse_devicehub.resources.enums import StatusCode - if result['Status'] == StatusCode.Success: + if result['Status'] == StatusCode.Success.value: timestamp = ( result.get('Data', {}).get('data', {}).get('timestamp', time.time()) ) diff --git a/ereuse_devicehub/resources/device/models.py b/ereuse_devicehub/resources/device/models.py index 3e3544ab..a06469ea 100644 --- a/ereuse_devicehub/resources/device/models.py +++ b/ereuse_devicehub/resources/device/models.py @@ -919,7 +919,7 @@ class Device(Thing): from ereuse_devicehub.resources.did.models import PROOF_ENUM, Proof from ereuse_devicehub.resources.enums import StatusCode - if result['Status'] == StatusCode.Success: + if result['Status'] == StatusCode.Success.value: timestamp = ( result.get('Data', {}).get('data', {}).get('timestamp', time.time()) )