[fix] domain remove if an app without a domain is installed

This commit is contained in:
Kayou 2020-05-06 11:57:28 +02:00 committed by GitHub
parent 42bc8c354a
commit a11654e0cf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -180,7 +180,7 @@ def domain_remove(operation_logger, domain, force=False):
# Check if apps are installed on the domain # Check if apps are installed on the domain
app_settings = [_get_app_settings(app) for app in _installed_apps()] app_settings = [_get_app_settings(app) for app in _installed_apps()]
if any(s["domain"] == domain for s in app_settings): if any("domain" in s and s["domain"] == domain for s in app_settings):
raise YunohostError('domain_uninstall_app_first') raise YunohostError('domain_uninstall_app_first')
operation_logger.start() operation_logger.start()