소스 검색

device=user fix

Hal De 4 년 전
부모
커밋
c01482d8f0
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  1. 2 0
      app/app.py

+ 2 - 0
app/app.py

@@ -632,6 +632,8 @@ async def unbindOtherDevices(user, newDevice, ast):
   devices = await amiDBGet('AMPUSER', '{}/device'.format(user))
   if devices not in NONEs:
     for _device in sorted(set(devices.split('&')), key=int):
+      if _device == user:
+        continue
       if _device != newDevice:
         if ast.FMDEVSTATE == 'TRUE':
           await amiSetVar('DEVICE_STATE(Custom:FOLLOWME{})'.format(_device), 'INVALID')