add Transfers to lot dropdown

This commit is contained in:
Cayo Puigdefabregas 2022-06-21 08:11:42 +02:00
parent 985039adcd
commit 2a3b7a0900
1 changed files with 6 additions and 1 deletions

View File

@ -141,7 +141,12 @@ class LotView(View):
# temporary
if lot_type == "temporary":
return query.filter(Lot.trade == None).filter(Lot.transfer == None)
return query.filter(Lot.trade == None).filter(
or_(
Lot.transfer == None,
Transfer.date == None
)
)
if lot_type == "incoming":
return query.filter(