Browse Source

Only remove the settings from the db

The plugin has to be uninstalled via 'pip uninstall'
in order to be completely removed from flaskbb.
Peter Justin 7 years ago
parent
commit
c130bdbcfa
1 changed files with 2 additions and 2 deletions
  1. 2 2
      flaskbb/management/views.py

+ 2 - 2
flaskbb/management/views.py

@@ -888,8 +888,8 @@ class UninstallPlugin(MethodView):
     def post(self, name):
         validate_plugin(name)
         plugin = PluginRegistry.query.filter_by(name=name).first_or_404()
-
-        plugin.delete()
+        PluginStore.query.filter_by(plugin_id=plugin.id).delete()
+        db.session.commit()
         flash(_("Plugin has been uninstalled."), "success")
         return redirect(url_for("management.plugins"))