From ce5aa0a13b442975de62b7d9c2d101a0312c58de Mon Sep 17 00:00:00 2001 From: tecnovert Date: Sun, 2 Jan 2022 00:18:17 +0200 Subject: [PATCH] Fix load bid failure case. --- basicswap/basicswap.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/basicswap/basicswap.py b/basicswap/basicswap.py index c48674a..c2fd34b 100644 --- a/basicswap/basicswap.py +++ b/basicswap/basicswap.py @@ -906,7 +906,9 @@ class BasicSwap(BaseApp): if self.debug: self.log.error(traceback.format_exc()) try: - self.deactivateBid(session, bid) + bid.setState(BidStates.BID_ERROR, 'Failed to activate') + offer = session.query(Offer).filter_by(offer_id=bid.offer_id).first() + self.deactivateBid(session, offer, bid) except Exception as ex: self.log.error('Further error deactivating: %s', str(ex)) if self.debug: