refactor return bool
This commit is contained in:
parent
36199a7ee1
commit
2e613265a6
|
@ -36,10 +36,7 @@ class LotDeviceForm(FlaskForm):
|
|||
self._devices = Device.query.filter(Device.id.in_(devices)).filter(
|
||||
Device.owner_id == g.user.id).distinct().all()
|
||||
|
||||
if not self._devices:
|
||||
return False
|
||||
|
||||
return True
|
||||
return bool(self._devices)
|
||||
|
||||
def save(self):
|
||||
self._lot.devices.update(self._devices)
|
||||
|
|
Reference in a new issue