Skip to content

Commit 2595586

Browse files
committed
Make bitshares#229 not raise a KeyError exception
1 parent 7a37be8 commit 2595586

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bitshares/market.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -505,7 +505,7 @@ def buy(
505505

506506
tx = self.blockchain.finalizeOp(order, account["name"], "active", **kwargs)
507507

508-
if returnOrderId:
508+
if returnOrderId and tx.get("operation_results"):
509509
tx["orderid"] = tx["operation_results"][0][1]
510510
self.blockchain.blocking = prevblocking
511511

0 commit comments

Comments
 (0)