reactor: 重构命令&录像存储模块的Serializer及相关模块 (#5392)

* reactor: 重构命令&录像存储模块的Serializer及相关模块


Co-authored-by: Bai <bugatti_it@163.com>
This commit is contained in:
fit2bot
2021-01-12 18:06:42 +08:00
committed by GitHub
parent b3f359d47b
commit 86a055638c
34 changed files with 636 additions and 551 deletions

View File

@@ -208,12 +208,11 @@ class SystemUser(BaseUser):
def get_protocol_by_application_type(cls, app_type):
from applications.const import ApplicationTypeChoices
if app_type in ApplicationTypeChoices.remote_app_types():
return cls.PROTOCOL_RDP
protocol = None
other_types = [*ApplicationTypeChoices.db_types(), *ApplicationTypeChoices.cloud_types()]
if app_type in other_types and app_type in cls.APPLICATION_CATEGORY_PROTOCOLS:
protocol = cls.PROTOCOL_RDP
else:
protocol = app_type
return protocol
if protocol in cls.APPLICATION_CATEGORY_PROTOCOLS:
return protocol
class Meta:
ordering = ['name']