浏览代码

保存和获取用户按钮

peng 1 年之前
父节点
当前提交
bee826d230
共有 1 个文件被更改,包括 1 次插入2 次删除
  1. 1 2
      Controller/EquipmentManagerV3.py

+ 1 - 2
Controller/EquipmentManagerV3.py

@@ -1180,7 +1180,6 @@ class EquipmentManagerV3(View):
         if not uid:
             return response.json(444)
         try:
-            Device_Info.objects.filter(UID=uid).update(audioVideoButton=0)
             if button_user1:
                 Device_Info.objects.filter(UID=uid, userID=button_user1).update(audioVideoButton=1)
             if button_user2:
@@ -1198,7 +1197,7 @@ class EquipmentManagerV3(View):
         if not uid:
             return response.json(444)
         try:
-            device_qs = Device_Info.objects.filter(UID=uid).values('userID', 'audioVideoButton')
+            device_qs = Device_Info.objects.filter(UID=uid).values('userID', 'audioVideoButton', 'NickName')
             return response.json(0, list(device_qs))
         except Exception as e:
             return response.json(500, repr(e))