fix lot trade

This commit is contained in:
Cayo Puigdefabregas 2024-02-09 22:41:56 +01:00
parent 74fe50b6fb
commit 4d416f426c
1 changed files with 2 additions and 1 deletions

View File

@ -2241,7 +2241,8 @@ class Trade(JoinedTableMixin, ActionWithMultipleTradeDocuments):
) )
lot = relationship( lot = relationship(
'Lot', 'Lot',
backref=backref('trade', lazy=True, uselist=False, cascade=CASCADE_OWN), backref=backref('trade', lazy=False, uselist=False, cascade=CASCADE_OWN),
# backref=backref('trade', lazy=True, uselist=False, cascade=CASCADE_OWN),
primaryjoin='Trade.lot_id == Lot.id', primaryjoin='Trade.lot_id == Lot.id',
) )