distinct instead of set
This commit is contained in:
parent
e3f917a3ce
commit
36199a7ee1
|
@ -33,8 +33,8 @@ class LotDeviceForm(FlaskForm):
|
|||
Lot.owner_id == g.user.id).one()
|
||||
|
||||
devices = set(self.devices.data.split(","))
|
||||
self._devices = set(Device.query.filter(Device.id.in_(devices)).filter(
|
||||
Device.owner_id == g.user.id).all())
|
||||
self._devices = Device.query.filter(Device.id.in_(devices)).filter(
|
||||
Device.owner_id == g.user.id).distinct().all()
|
||||
|
||||
if not self._devices:
|
||||
return False
|
||||
|
|
Reference in a new issue