diff --git a/apps/jumpserver/settings/base.py b/apps/jumpserver/settings/base.py index 0ce5e9da3..71c641e71 100644 --- a/apps/jumpserver/settings/base.py +++ b/apps/jumpserver/settings/base.py @@ -35,7 +35,7 @@ def parse_sentinels_host(sentinels_host): VERSION = const.VERSION BASE_DIR = const.BASE_DIR PROJECT_DIR = const.PROJECT_DIR -APP_DIR = os.path.join(PROJECT_DIR, 'apps') +APPS_DIR = os.path.join(PROJECT_DIR, 'apps') DATA_DIR = os.path.join(PROJECT_DIR, 'data') ANSIBLE_DIR = os.path.join(DATA_DIR, 'ansible') CERTS_DIR = os.path.join(DATA_DIR, 'certs') diff --git a/apps/terminal/api/applet/applet.py b/apps/terminal/api/applet/applet.py index b30b33f36..fddf90ad1 100644 --- a/apps/terminal/api/applet/applet.py +++ b/apps/terminal/api/applet/applet.py @@ -78,6 +78,7 @@ class DownloadUploadMixin: with open(zip_path, 'rb') as f: response = HttpResponse(f.read(), status=200, content_type='application/octet-stream') response['Content-Disposition'] = 'attachment; filename*=UTF-8\'\'{}.zip'.format(instance.name) + os.unlink(zip_path) return response diff --git a/apps/terminal/serializers/session.py b/apps/terminal/serializers/session.py index 517262e0f..184262ec4 100644 --- a/apps/terminal/serializers/session.py +++ b/apps/terminal/serializers/session.py @@ -22,7 +22,7 @@ class SessionType(models.TextChoices): class SessionSerializer(BulkOrgResourceModelSerializer): org_id = serializers.CharField(allow_blank=True) protocol = serializers.ChoiceField(choices=Protocol.choices, label=_("Protocol")) - type = LabeledChoiceField(choices=SessionType.choices, label=_("Type")) + type = LabeledChoiceField(choices=SessionType.choices, label=_("Type"), default=SessionType.normal) class Meta: model = Session