diff options
author | Wojtek Kosior <koszko@koszko.org> | 2022-08-25 16:37:53 +0200 |
---|---|---|
committer | Wojtek Kosior <koszko@koszko.org> | 2022-09-28 12:54:54 +0200 |
commit | 367ea85057368047a50ae98a3510e0113eadd744 (patch) | |
tree | 5aecfd3a2e44377e9d331ca77346666ca193006c /src/hydrilla/proxy/web_ui/packages.py | |
parent | c1f6a379b3a85303f487e1b366e96d9db90cd4e3 (diff) | |
download | haketilo-hydrilla-367ea85057368047a50ae98a3510e0113eadd744.tar.gz haketilo-hydrilla-367ea85057368047a50ae98a3510e0113eadd744.zip |
[proxy] make it possible to uninstall a package
This commit also brings some more refactoring under state_impl/.
Diffstat (limited to 'src/hydrilla/proxy/web_ui/packages.py')
-rw-r--r-- | src/hydrilla/proxy/web_ui/packages.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/hydrilla/proxy/web_ui/packages.py b/src/hydrilla/proxy/web_ui/packages.py index 1edddc0..31d3dbb 100644 --- a/src/hydrilla/proxy/web_ui/packages.py +++ b/src/hydrilla/proxy/web_ui/packages.py @@ -175,8 +175,11 @@ def alter_package_version(mapping_version_id: str) -> werkzeug.Response: if action == 'install_package': mapping_version_ref.install() elif action == 'uninstall_package': - mapping_version_ref.uninstall() - return flask.redirect(flask.url_for('.packages')) + mapping_version_ref = mapping_version_ref.uninstall() + if mapping_version_ref is None: + return flask.redirect(flask.url_for('.packages')) + else: + return show_package_version(mapping_version_id) else: raise ValueError() except st.FileInstallationError: |