fix: Update filter processing logic in EasySwitchManager to ensure all communities are tracked, improving data integrity and consistency in gateway assignments.
Publish Fast Tabler Docker image / build-and-push-fast (push) Successful in 2m2s
Publish Fast Tabler Docker image / build-and-push-fast (push) Successful in 2m2s
This commit is contained in:
@@ -251,14 +251,17 @@ function EasySwitchManager() {
|
|||||||
currentFilters.forEach(filter => {
|
currentFilters.forEach(filter => {
|
||||||
const newGateway = communitiesMap.get(filter.community);
|
const newGateway = communitiesMap.get(filter.community);
|
||||||
if (newGateway) {
|
if (newGateway) {
|
||||||
|
// Обновляем gateway
|
||||||
updatedFilters.push({
|
updatedFilters.push({
|
||||||
...filter,
|
...filter,
|
||||||
gateway: newGateway
|
gateway: newGateway
|
||||||
});
|
});
|
||||||
processedCommunities.add(filter.community);
|
|
||||||
} else {
|
} else {
|
||||||
|
// Оставляем без изменений
|
||||||
updatedFilters.push(filter);
|
updatedFilters.push(filter);
|
||||||
}
|
}
|
||||||
|
// ВАЖНО: добавляем в processedCommunities в любом случае
|
||||||
|
processedCommunities.add(filter.community);
|
||||||
});
|
});
|
||||||
|
|
||||||
// Добавляем новые фильтры для communities, которых не было
|
// Добавляем новые фильтры для communities, которых не было
|
||||||
|
|||||||
Reference in New Issue
Block a user