Spaces:
Sleeping
Sleeping
Update components/agentcreation.py
Browse files
components/agentcreation.py
CHANGED
|
@@ -22,11 +22,10 @@ async def create_keypair(agent):
|
|
| 22 |
"public_key": str(keypair.pubkey()),
|
| 23 |
"secret_key": bytes(keypair).hex()
|
| 24 |
}
|
| 25 |
-
|
| 26 |
{"owner": "system"},
|
| 27 |
{"$push": {"agents": keypair_data}}
|
| 28 |
)
|
| 29 |
-
print(res)
|
| 30 |
except Exception as e:
|
| 31 |
print(e)
|
| 32 |
raise
|
|
|
|
| 22 |
"public_key": str(keypair.pubkey()),
|
| 23 |
"secret_key": bytes(keypair).hex()
|
| 24 |
}
|
| 25 |
+
await coll.update_one(
|
| 26 |
{"owner": "system"},
|
| 27 |
{"$push": {"agents": keypair_data}}
|
| 28 |
)
|
|
|
|
| 29 |
except Exception as e:
|
| 30 |
print(e)
|
| 31 |
raise
|