mirror of https://github.com/halo-dev/halo
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 ```pull/5396/head^2
parent
348079d82e
commit
b132597cac
|
@ -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)));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue