Fix load bid failure case.

This commit is contained in:
tecnovert 2022-01-02 00:18:17 +02:00
parent 3e5c3e1e6a
commit ce5aa0a13b
No known key found for this signature in database
GPG key ID: 8ED6D8750C4E3F93

View file

@ -906,7 +906,9 @@ class BasicSwap(BaseApp):
if self.debug: if self.debug:
self.log.error(traceback.format_exc()) self.log.error(traceback.format_exc())
try: 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: except Exception as ex:
self.log.error('Further error deactivating: %s', str(ex)) self.log.error('Further error deactivating: %s', str(ex))
if self.debug: if self.debug: