From 951f0130aab3d1cc109a8930458e7bfc7c83af53 Mon Sep 17 00:00:00 2001 From: zxstty Date: Mon, 21 Apr 2025 12:02:19 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=BA=94=E7=94=A8=E4=B8=AD?= =?UTF-8?q?=E5=BF=83=E5=92=8C=E8=AF=AD=E4=B9=89=E6=8E=A5=E5=8F=A3=E4=B8=AD?= =?UTF-8?q?=E5=BF=83=E7=94=A8=E7=94=A8=E6=88=B7=E5=90=8D=E6=A3=80=E7=B4=A2?= =?UTF-8?q?=E5=BA=94=E7=94=A8=E6=97=B6=E5=87=BA=E7=8E=B0=E9=9D=9E=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E5=88=9B=E5=BB=BA=E7=9A=84=E5=BA=94=E7=94=A8=E7=9A=84?= =?UTF-8?q?bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 2 +- apps/manager/appcenter.py | 2 ++ apps/manager/service.py | 7 +++++-- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 4cabfda46..0e4ae446b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM hub.oepkgs.net/neocopilot/framework-baseimg:dev +FROM hub.oepkgs.net/neocopilot/framework_base:0.9.5-x86-test USER root RUN sed -i 's/umask 002/umask 027/g' /etc/bashrc && \ diff --git a/apps/manager/appcenter.py b/apps/manager/appcenter.py index 48b25df9c..1dffb7e2f 100644 --- a/apps/manager/appcenter.py +++ b/apps/manager/appcenter.py @@ -100,6 +100,8 @@ class AppCenterManager: if search_type == SearchType.AUTHOR: if keyword is not None and keyword not in user_sub: return [], 0 + else: + keyword = user_sub base_filter = {"author": user_sub} filters: dict[str, Any] = ( AppCenterManager._build_filters( diff --git a/apps/manager/service.py b/apps/manager/service.py index eefbfed25..55775b765 100644 --- a/apps/manager/service.py +++ b/apps/manager/service.py @@ -68,8 +68,11 @@ class ServiceCenterManager: page_size: int, ) -> tuple[list[ServiceCardItem], int]: """获取用户创建的服务""" - if search_type == SearchType.AUTHOR and keyword is not None and keyword not in user_sub: - return [], 0 + if search_type == SearchType.AUTHOR: + if keyword is not None and keyword not in user_sub: + return [], 0 + else: + keyword = user_sub base_filter = {"author": user_sub} filters = ServiceCenterManager._build_filters(base_filter, search_type, keyword) if keyword else base_filter service_pools, total_count = await ServiceCenterManager._search_service(filters, page, page_size) -- Gitee