refactor return bool

This commit is contained in:
Cayo Puigdefabregas 2022-01-26 11:25:50 +01:00
parent 36199a7ee1
commit 2e613265a6
1 changed files with 1 additions and 4 deletions

View File

@ -36,10 +36,7 @@ class LotDeviceForm(FlaskForm):
self._devices = Device.query.filter(Device.id.in_(devices)).filter( self._devices = Device.query.filter(Device.id.in_(devices)).filter(
Device.owner_id == g.user.id).distinct().all() Device.owner_id == g.user.id).distinct().all()
if not self._devices: return bool(self._devices)
return False
return True
def save(self): def save(self):
self._lot.devices.update(self._devices) self._lot.devices.update(self._devices)