From d6d4adc1d2ab82a8cb4587809c6e5c08438486bc Mon Sep 17 00:00:00 2001 From: qiaofeng1227 <76487013@qq.com> Date: Tue, 16 May 2023 10:37:51 +0800 Subject: [PATCH] Update manage.py --- appmanage/api/service/manage.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/appmanage/api/service/manage.py b/appmanage/api/service/manage.py index 92a430e7..0e81b220 100644 --- a/appmanage/api/service/manage.py +++ b/appmanage/api/service/manage.py @@ -560,12 +560,15 @@ def app_domain_delete(app_id, domain): raise CommandException(const.ERROR_CLIENT_PARAM_NOTEXIST, "APP is not exist", "") else: raise CommandException(code, message, "") - old_all_domains = get_all_domains(app_id) + if domain is None or domain == "undefined": + raise CommandException(const.ERROR_CLIENT_PARAM_BLANK, "Domains is blank", "") + + old_all_domains = get_all_domains(app_id) if domain not in old_all_domains: myLogger.info_logger("delete domain is not binded") raise CommandException(const.ERROR_CLIENT_PARAM_NOTEXIST, "Domain is not bind.", "") - + myLogger.info_logger("Start to delete " + domain) proxy = get_proxy_domain(app_id, domain) if proxy != None: