blt all 只返回在线标签

This commit is contained in:
曹前明 2022-10-19 09:42:55 +08:00
parent cfc6b072c6
commit e439278da5
1 changed files with 6 additions and 3 deletions

View File

@ -97,6 +97,9 @@ class BltViewSet(CustomGenericViewSet):
blt_list = res['recordList'] blt_list = res['recordList']
macs = [] macs = []
for i in blt_list: for i in blt_list:
if 'online' in i and i['online'] == False:
pass
else:
if 'userId' in i: if 'userId' in i:
i['mac'] = i['userId'] i['mac'] = i['userId']
macs.append(i['mac']) macs.append(i['mac'])