diff --git a/src/node/rpc/jwt_management.h b/src/node/rpc/jwt_management.h index 67e4ec538e4..af877e075f8 100644 --- a/src/node/rpc/jwt_management.h +++ b/src/node/rpc/jwt_management.h @@ -102,17 +102,16 @@ namespace ccf updated.push_back(key); } } - if (updated.size() < v.size()) + + if (updated.empty()) { - if (!updated.empty()) - { - metadata->put(k, updated); - } - else - { - metadata->remove(k); - } + metadata->remove(k); } + else if (updated.size() < v.size()) + { + metadata->put(k, updated); + } + return true; }); }