This commit is contained in:
DHR60 2026-02-28 19:27:00 +08:00
parent de0fa9d455
commit 023f9f1a7e
2 changed files with 15 additions and 6 deletions

View file

@ -1191,10 +1191,15 @@ public static class ConfigHandler
{
var result = new RetResult();
var indexId = Utils.GetGuid(false);
var subId = subItem?.Id;
if (subId.IsNullOrEmpty())
{
result.Success = false;
return result;
}
var remark = subItem is null ? ResUI.TbConfigTypePolicyGroup : $"{subItem.Remarks} - {ResUI.TbConfigTypePolicyGroup}";
var indexId = Utils.GetGuid(false);
var remark = $"{subItem.Remarks} - {ResUI.TbConfigTypePolicyGroup}";
var profile = new ProfileItem
{
IndexId = indexId,
@ -1245,14 +1250,18 @@ public static class ConfigHandler
public static async Task<RetResult> AddGroupRegionServer(Config config, SubItem? subItem)
{
var result = new RetResult();
var subId = subItem?.Id;
if (subId.IsNullOrEmpty())
{
result.Success = false;
return result;
}
List<string> indexIdList = [];
foreach (var regionFilter in PolicyGroupRegionFilters)
{
var indexId = Utils.GetGuid(false);
var subId = subItem?.Id;
var remark = subItem is null ? ResUI.TbConfigTypePolicyGroup : $"{subItem.Remarks} - {ResUI.TbConfigTypePolicyGroup} - {regionFilter.Key}";
var remark = $"{subItem.Remarks} - {ResUI.TbConfigTypePolicyGroup} - {regionFilter.Key}";
var profile = new ProfileItem
{
IndexId = indexId,

View file

@ -128,7 +128,7 @@ public class GroupProfileManager
private static async Task<List<ProfileItem>> GetSubChildProfileItems(ProtocolExtraItem? extra)
{
if (extra == null || extra.Filter.IsNullOrEmpty())
if (extra == null || extra.SubChildItems.IsNullOrEmpty())
{
return [];
}