Fix plugin update crashing after the rows are refreshed

Plugin::refreshRows() drops the Sushi connection, and only a newly
constructed model boots it again. updatePlugin() called refresh() on the
instance it was given, which queries through the dropped connection and
fails with "Call to a member function query() on null". Load the plugin
again with findOrFail(), like the plugin jobs already do.
This commit is contained in:
dualfroz committed 2026-09-24 18:46:25 +02:00
1 parent 4494b7409f
commit 7e79170bf9
2 files changed
+59 -1

No files matched your search

+1 -1
View File
@@ -321,7 +321,7 @@ class PluginService
$this->downloadPluginFromUrl($downloadUrl, $plugin->id);
Plugin::refreshRows();
$plugin = $plugin->refresh();
$plugin = Plugin::findOrFail($plugin->id);
$this->installPlugin($plugin, false);