Skip to content

Commit d1ee3e2

Browse files
committed
fix(settings): skip dedup when latest global policy revision is superseded
1 parent 67e3079 commit d1ee3e2

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

crates/openshell-server/src/grpc.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1137,7 +1137,10 @@ impl OpenShell for OpenShellService {
11371137
})?;
11381138

11391139
if let Some(ref current) = latest {
1140-
if current.policy_hash == hash {
1140+
// Only dedup if the latest revision is still active
1141+
// (loaded). If it was superseded (e.g. after a global
1142+
// policy delete), always create a new revision.
1143+
if current.policy_hash == hash && current.status == "loaded" {
11411144
// Same policy hash — skip creating a new revision but
11421145
// still ensure the settings blob has the policy key
11431146
// (it may have been lost to a pod restart while the

0 commit comments

Comments
 (0)