fix: skip missing groups in policy_db_get instead of aborting (#2393)

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: 安正超 <anzhengchao@gmail.com>
This commit is contained in:
Alexander Kharkevich
2026-04-06 21:17:39 -04:00
committed by GitHub
parent 32bf8f5bf3
commit 740e4399af
2 changed files with 31 additions and 2 deletions
+5 -1
View File
@@ -755,7 +755,11 @@ where
if let Some(groups) = groups {
for group in groups.iter() {
let (gp, _) = self.policy_db_get_internal(group, true, present).await?;
let (gp, _) = match self.policy_db_get_internal(group, true, present).await {
Ok(result) => result,
Err(err) if is_err_no_such_group(&err) => continue,
Err(err) => return Err(err),
};
gp.iter().for_each(|v| {
policies.push(v.clone());
});