Update manage.py

This commit is contained in:
qiaofeng1227 2023-05-15 16:03:11 +08:00 committed by GitHub
parent f5ae1088a3
commit 918ba14605
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -535,7 +535,7 @@ def app_domain_list(app_id):
return domains
def app_domain_delete(app_id, domains):
def app_domain_delete(app_id, domain):
code, message = docker.check_app_id(app_id)
if code == None:
info, flag = app_exits_in_docker(app_id)
@ -546,7 +546,7 @@ def app_domain_delete(app_id, domains):
else:
raise CommandException(code, message, "")
old_all_domains = get_all_domains(app_id)
for domain in domains:
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.", "")
@ -558,8 +558,7 @@ def app_domain_delete(app_id, domains):
myLogger.info_logger("before update")
domains_old = proxy["domain_names"]
myLogger.info_logger(domains_old)
for domain in domains:
if domain in domains_old:
domains_old.remove(domain)
myLogger.info_logger("after update")
myLogger.info_logger(domains_old)