fixed bug hid == None

This commit is contained in:
Cayo Puigdefabregas 2020-12-02 13:15:21 +01:00
parent 8a508ebc0e
commit c03d872d91
1 changed files with 1 additions and 1 deletions

View File

@ -216,7 +216,7 @@ class ActionView(View):
device = snapshot.get('device') # type: Computer
# TODO @cayop dependency of pulls 85 and 83
# if the pr/85 and pr/83 is merged, then you need change this way for get the device
if not Device.query.filter(Device.hid==device.hid).count():
if not device.hid or not Device.query.filter(Device.hid==device.hid).count():
return
device = Device.query.filter(Device.hid==device.hid).one()