allow deleting external applications

This commit is contained in:
Maarten de Waard 2022-10-04 15:02:11 +02:00
parent 808533fabd
commit 5ac175e44e
No known key found for this signature in database
GPG key ID: 1D3E893A657CC8DA
2 changed files with 12 additions and 5 deletions

View file

@ -105,12 +105,13 @@ def delete_app(slug):
return
app_status = app_obj.get_status()
if not app_status.installed:
app_obj.delete()
current_app.logger.info("Success.")
else:
if app_status.installed and not app_obj.external:
current_app.logger.info("Can not delete installed application, run"
" 'uninstall' first")
return
app_obj.delete()
current_app.logger.info("Success.")
@app_cli.command(