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')