From 0dd7879389c060e9975dc295c168012eb3ece110 Mon Sep 17 00:00:00 2001 From: DSQ Date: Mon, 23 Mar 2026 12:42:27 +0800 Subject: [PATCH] [0.2.8.12][ci] --- elastic/views.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/elastic/views.py b/elastic/views.py index 2fb3665..86c686f 100644 --- a/elastic/views.py +++ b/elastic/views.py @@ -1264,6 +1264,10 @@ def add_key_view(request): request.session.modified = True except Exception: pass + cur_manage = [str(x).strip() for x in list((me or {}).get("manage_key") or []) if str(x).strip()] + if key_name not in cur_manage: + cur_manage.append(key_name) + es_update_user_by_id(uid, manage_key=cur_manage) elif can_manage_reg: cur = [str(x).strip() for x in list((me or {}).get("registration_manage_keys") or []) if str(x).strip()] if key_name not in cur: