mirror of
https://github.com/fastogt/fastocloud_admin.git
synced 2025-03-09 23:38:52 +00:00
Sources UP
This commit is contained in:
parent
3e2d1b15db
commit
d6ff721dec
2 changed files with 7 additions and 2 deletions
|
@ -1 +1 @@
|
||||||
Subproject commit 694cf21806c396a97732aeb49a8f4b2784a1bb8c
|
Subproject commit 30e5a5b6ac2c7b9cb4c9bd226b9aadc132656298
|
|
@ -3,7 +3,7 @@ import logging
|
||||||
from app.service.service_manager import ServiceManager
|
from app.service.service_manager import ServiceManager
|
||||||
|
|
||||||
from app.service.subscriber_client import SubscriberConnection
|
from app.service.subscriber_client import SubscriberConnection
|
||||||
from app.common.subscriber.entry import Subscriber
|
from app.common.subscriber.entry import Subscriber, Device
|
||||||
from app.common.constants import PlayerMessage
|
from app.common.constants import PlayerMessage
|
||||||
from pyfastocloud.subscriber_client import Commands
|
from pyfastocloud.subscriber_client import Commands
|
||||||
from pyfastocloud.client import make_utc_timestamp
|
from pyfastocloud.client import make_utc_timestamp
|
||||||
|
@ -162,6 +162,7 @@ class SubscribersServiceManager(ServiceManager, IClientHandler):
|
||||||
result = client.activate_device_success(cid, check_user.get_devices())
|
result = client.activate_device_success(cid, check_user.get_devices())
|
||||||
if not result:
|
if not result:
|
||||||
return False
|
return False
|
||||||
|
|
||||||
client.info = check_user
|
client.info = check_user
|
||||||
self.__activate_subscriber(client)
|
self.__activate_subscriber(client)
|
||||||
return True
|
return True
|
||||||
|
@ -193,6 +194,10 @@ class SubscribersServiceManager(ServiceManager, IClientHandler):
|
||||||
client.login_fail(cid, 'Device not found')
|
client.login_fail(cid, 'Device not found')
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
if found_device.staus == Device.Status.NOT_ACTIVE:
|
||||||
|
found_device.staus = Device.Status.ACTIVE
|
||||||
|
found_device.save()
|
||||||
|
|
||||||
user_connections = self.get_user_connections_by_email(login)
|
user_connections = self.get_user_connections_by_email(login)
|
||||||
for conn in user_connections:
|
for conn in user_connections:
|
||||||
if conn.device == found_device:
|
if conn.device == found_device:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue