From aceb0986036930cfac343f7874c78caa17e0728e Mon Sep 17 00:00:00 2001 From: Leo Date: Wed, 9 Oct 2019 09:47:17 +0800 Subject: [PATCH] fix params check logic in web settings api, enable empty 'CUSTOM CSS' param (#4127) --- seahub/api2/endpoints/admin/web_settings.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/seahub/api2/endpoints/admin/web_settings.py b/seahub/api2/endpoints/admin/web_settings.py index 24837a157e..33e8469b45 100644 --- a/seahub/api2/endpoints/admin/web_settings.py +++ b/seahub/api2/endpoints/admin/web_settings.py @@ -79,7 +79,7 @@ class AdminWebSettings(APIView): error_msg = _(u'value invalid.') return api_error(status.HTTP_400_BAD_REQUEST, error_msg) - if key in STRING_WEB_SETTINGS and not value: + if (key in STRING_WEB_SETTINGS and key != 'CUSTOM_CSS') and not value: error_msg = _(u'value invalid.') return api_error(status.HTTP_400_BAD_REQUEST, error_msg)