fix
This commit is contained in:
parent
8f58bcb24e
commit
d1abc8075f
|
@ -513,7 +513,7 @@ class EraseBasic(JoinedWithOneDeviceMixin, ActionWithOneDevice):
|
||||||
result = api.generate_proof(deviceCHID, docID, docSig, issuerID, proof_type)
|
result = api.generate_proof(deviceCHID, docID, docSig, issuerID, proof_type)
|
||||||
from ereuse_devicehub.resources.enums import StatusCode
|
from ereuse_devicehub.resources.enums import StatusCode
|
||||||
|
|
||||||
if result['Status'] == StatusCode.Success:
|
if result['Status'] == StatusCode.Success.value:
|
||||||
timestamp = (
|
timestamp = (
|
||||||
result.get('Data', {}).get('data', {}).get('timestamp', time.time())
|
result.get('Data', {}).get('data', {}).get('timestamp', time.time())
|
||||||
)
|
)
|
||||||
|
|
|
@ -919,7 +919,7 @@ class Device(Thing):
|
||||||
from ereuse_devicehub.resources.did.models import PROOF_ENUM, Proof
|
from ereuse_devicehub.resources.did.models import PROOF_ENUM, Proof
|
||||||
from ereuse_devicehub.resources.enums import StatusCode
|
from ereuse_devicehub.resources.enums import StatusCode
|
||||||
|
|
||||||
if result['Status'] == StatusCode.Success:
|
if result['Status'] == StatusCode.Success.value:
|
||||||
timestamp = (
|
timestamp = (
|
||||||
result.get('Data', {}).get('data', {}).get('timestamp', time.time())
|
result.get('Data', {}).get('data', {}).get('timestamp', time.time())
|
||||||
)
|
)
|
||||||
|
|
Reference in New Issue