From 84e60283b8bdc32b9b7411044cccf4dd874ac69d Mon Sep 17 00:00:00 2001 From: ibuler Date: Fri, 13 Aug 2021 18:39:00 +0800 Subject: [PATCH 1/3] =?UTF-8?q?fix(account):=20=E4=BF=AE=E5=A4=8D=E5=BA=94?= =?UTF-8?q?=E7=94=A8=E8=B4=A6=E5=8F=B7=E5=89=8D=E7=AB=AF=E4=B8=8D=E5=AF=B9?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/applications/serializers/application.py | 1 + 1 file changed, 1 insertion(+) diff --git a/apps/applications/serializers/application.py b/apps/applications/serializers/application.py index 3aa2c642c..73b4eb7f7 100644 --- a/apps/applications/serializers/application.py +++ b/apps/applications/serializers/application.py @@ -68,6 +68,7 @@ class ApplicationSerializer(ApplicationSerializerMixin, BulkOrgResourceModelSeri class ApplicationAccountSerializer(serializers.Serializer): + id = serializers.ReadOnlyField(label=_("Id"), source='uid') username = serializers.ReadOnlyField(label=_("Username")) password = serializers.CharField(write_only=True, label=_("Password")) systemuser = serializers.ReadOnlyField(label=_('System user')) From a5419b49eecbcfb3fc4d18b431bbaed8cc6461af Mon Sep 17 00:00:00 2001 From: ibuler Date: Fri, 13 Aug 2021 11:23:19 +0800 Subject: [PATCH 2/3] =?UTF-8?q?perf:=20=E6=B7=BB=E5=8A=A0=E7=9B=91?= =?UTF-8?q?=E6=B5=8B=20celery?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- utils/check_celery.sh | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 utils/check_celery.sh diff --git a/utils/check_celery.sh b/utils/check_celery.sh new file mode 100644 index 000000000..dce8edb45 --- /dev/null +++ b/utils/check_celery.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +if [[ "$(ps axu | grep 'celery' | grep -v 'grep' | grep -cv 'defunct')" == "5" ]];then + exit 0 +else + exit 1 +fi \ No newline at end of file From bee4e05b5fae10908703c3c1abff18e78d707cac Mon Sep 17 00:00:00 2001 From: ibuler Date: Mon, 16 Aug 2021 11:20:50 +0800 Subject: [PATCH 3/3] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=BA=94=E7=94=A8?= =?UTF-8?q?=E8=B4=A6=E5=8F=B7=E4=B8=AD=E6=B2=A1=E6=9C=89=E5=BA=94=E7=94=A8?= =?UTF-8?q?=E5=8D=B4=E6=9C=89=E8=B4=A6=E5=8F=B7=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/applications/api/account.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/applications/api/account.py b/apps/applications/api/account.py index 1874b2bab..8071125b2 100644 --- a/apps/applications/api/account.py +++ b/apps/applications/api/account.py @@ -35,7 +35,8 @@ class ApplicationAccountViewSet(JMSModelViewSet): http_method_names = ['get', 'put', 'patch', 'options'] def get_queryset(self): - queryset = ApplicationPermission.objects.all() \ + queryset = ApplicationPermission.objects.exclude(system_users__isnull=True) \ + .exclude(applications__isnull=True) \ .annotate(uid=Concat( 'applications', Value('_'), 'system_users', output_field=CharField() )) \