Explorar o código

重置门铃静音2

chenshibin %!s(int64=4) %!d(string=hai) anos
pai
achega
ac1ba17ac8
Modificáronse 1 ficheiros con 4 adicións e 1 borrados
  1. 4 1
      Controller/ShadowController.py

+ 4 - 1
Controller/ShadowController.py

@@ -88,7 +88,10 @@ def update_device_shadow(request):
 
             uidc_qs = UidChannelSetModel.objects.filter(uid__uid=uid)
             if uidc_qs.exists():
-                uidc_qs.update(voice_prompt_intelligent_mute=0)
+                uidc_qs.update(**{
+                    'voice_prompt_intelligent_mute':0, 'voice_prompt_status':0, 'voice_prompt_enter':0, 'voice_prompt_leave':0
+                })
+                uidc_qs.update()
 
         # return JsonResponse(status=200, data={'code': 0, 'msg': 'success', 'data': {}})
         ucode = request_dict.get('ucode', None)