From b132597cac9f44c3b8a220c200610ecdd2eaa24b Mon Sep 17 00:00:00 2001 From: John Niang Date: Mon, 26 Feb 2024 16:36:11 +0800 Subject: [PATCH] Fix the problem of updating plugin extensions incorrectly (#5404) #### What type of PR is this? /kind bug /area plugin /area core /milestone 2.13.x #### What this PR does / why we need it: Fix the problem of updating plugin extensions incorrectly. #### Which issue(s) this PR fixes: Fixes https://github.com/halo-dev/halo/issues/5394 #### Does this PR introduce a user-facing change? ```release-note None ``` --- .../src/main/java/run/halo/app/plugin/PluginStartedListener.java | 1 + 1 file changed, 1 insertion(+) diff --git a/application/src/main/java/run/halo/app/plugin/PluginStartedListener.java b/application/src/main/java/run/halo/app/plugin/PluginStartedListener.java index 791f04f7d..991784770 100644 --- a/application/src/main/java/run/halo/app/plugin/PluginStartedListener.java +++ b/application/src/main/java/run/halo/app/plugin/PluginStartedListener.java @@ -38,6 +38,7 @@ public class PluginStartedListener { .doOnNext(old -> { unstructured.getMetadata().setVersion(old.getMetadata().getVersion()); }) + .map(ignored -> unstructured) .flatMap(client::update) .switchIfEmpty(Mono.defer(() -> client.create(unstructured))); }