fix proof

This commit is contained in:
Cayo Puigdefabregas 2023-02-17 17:26:38 +01:00
parent 8efccf4f58
commit 1907f2508a
1 changed files with 2 additions and 2 deletions

View File

@ -898,15 +898,15 @@ class Device(Thing):
api = API(api_dlt, token_dlt, "ethereum")
result = api.register_device(self.chid)
# import pdb; pdb.set_trace()
from ereuse_devicehub.resources.did.models import PROOF_ENUM, Proof
from ereuse_devicehub.resources.enums import StatusCode
# import pdb; pdb.set_trace()
if result['Status'] == StatusCode.Success:
timestamp = result['Data'].get('data', {}).get('timestamp', time.time())
d = {
"type": PROOF_ENUM['Register'],
"device_id": self.device.id,
"device_id": self.id,
"snapshot": self,
"timestamp": timestamp,
"issuer_id": g.user.id,