mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
[mod] also display app label on remove_domain with apps
This commit is contained in:
parent
d31ba05a26
commit
c7d315c7e0
1 changed files with 3 additions and 2 deletions
|
@ -182,7 +182,7 @@ def domain_remove(operation_logger, domain, force=False):
|
|||
|
||||
"""
|
||||
from yunohost.hook import hook_callback
|
||||
from yunohost.app import app_ssowatconf
|
||||
from yunohost.app import app_ssowatconf, app_info
|
||||
from yunohost.utils.ldap import _get_ldap_interface
|
||||
|
||||
if not force and domain not in domain_list()['domains']:
|
||||
|
@ -204,8 +204,9 @@ def domain_remove(operation_logger, domain, force=False):
|
|||
|
||||
for app in _installed_apps():
|
||||
settings = _get_app_settings(app)
|
||||
label = app_info(app)["name"]
|
||||
if settings.get("domain") == domain:
|
||||
apps_on_that_domain.append("%s (on https://%s%s)" % (app, domain, settings["path"]) if "path" in settings else app)
|
||||
apps_on_that_domain.append("%s \"%s\" (on https://%s%s)" % (app, label, domain, settings["path"]) if "path" in settings else app)
|
||||
|
||||
if apps_on_that_domain:
|
||||
raise YunohostError('domain_uninstall_app_first', apps=", ".join(apps_on_that_domain))
|
||||
|
|
Loading…
Add table
Reference in a new issue