Update ereuse_devicehub/inventory/forms.py
This commit is contained in:
parent
eb84884db4
commit
473a7a02de
|
@ -724,9 +724,6 @@ class TradeForm(NewActionForm):
|
||||||
self.user_from.render_kw['data-email'] = g.user.email
|
self.user_from.render_kw['data-email'] = g.user.email
|
||||||
self.user_to.render_kw['data-email'] = g.user.email
|
self.user_to.render_kw['data-email'] = g.user.email
|
||||||
self._lot = (
|
self._lot = (
|
||||||
# Lot.query.filter(Lot.id == self.lot.data)
|
|
||||||
# .filter(Lot.owner_id == g.user.id)
|
|
||||||
# .one()
|
|
||||||
Lot.query.outerjoin(Trade)
|
Lot.query.outerjoin(Trade)
|
||||||
.filter(Lot.id == self.lot.data)
|
.filter(Lot.id == self.lot.data)
|
||||||
.filter(or_(Trade.user_from == g.user,
|
.filter(or_(Trade.user_from == g.user,
|
||||||
|
|
Reference in a new issue