Delete custom data before the trade.

This commit is contained in:
eSeR1805 2022-06-19 20:03:56 +03:00
parent 8494bea64f
commit c420304b33
No known key found for this signature in database
GPG Key ID: BA53686259B46936

View File

@ -1087,12 +1087,12 @@ class Trade(_DECL_BASE, LocalTrade):
for order in self.orders: for order in self.orders:
Order.query.session.delete(order) Order.query.session.delete(order)
Trade.query.session.delete(self)
Trade.commit()
for entry in self.custom_data: for entry in self.custom_data:
CustomData.query.session.delete(entry) CustomData.query.session.delete(entry)
CustomData.query.session.commit() CustomData.query.session.commit()
Trade.query.session.delete(self)
Trade.commit()
@staticmethod @staticmethod
def commit(): def commit():