perf: 重构工单处理流程 (#5408)

* perf: 重构工单处理流程

* perf: 重构工单处理流程 (1)

* perf: 重构工单处理流程 (2)

* perf: 重构工单处理流程 (3)

* perf: 重构工单处理流程 (4)

* perf: 重构工单处理流程 (5)

* perf: 重构工单处理流程 (6)

Co-authored-by: Bai <bugatti_it@163.com>
This commit is contained in:
fit2bot
2021-01-13 17:49:03 +08:00
committed by GitHub
parent 528e251f31
commit a7468a243d
28 changed files with 411 additions and 619 deletions

View File

@@ -207,12 +207,13 @@ class SystemUser(BaseUser):
@classmethod
def get_protocol_by_application_type(cls, app_type):
from applications.const import ApplicationTypeChoices
if app_type in ApplicationTypeChoices.remote_app_types():
if app_type in cls.APPLICATION_CATEGORY_PROTOCOLS:
protocol = app_type
elif app_type in ApplicationTypeChoices.remote_app_types():
protocol = cls.PROTOCOL_RDP
else:
protocol = app_type
if protocol in cls.APPLICATION_CATEGORY_PROTOCOLS:
return protocol
protocol = None
return protocol
class Meta:
ordering = ['name']