This commit is contained in:
Cayo Puigdefabregas 2023-03-14 12:50:57 +01:00
parent 8f58bcb24e
commit d1abc8075f
2 changed files with 2 additions and 2 deletions

View File

@ -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())
)

View File

@ -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())
)