mirror of
https://github.com/MarekWo/mc-webui.git
synced 2026-03-28 17:42:45 +01:00
fix: Remove extra argument from _filter_contacts_by_criteria call
The function internally fetches protected contacts, so passing it as a third argument was incorrect and caused TypeError. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -270,7 +270,6 @@ def _cleanup_job():
|
||||
# Import here to avoid circular imports
|
||||
from app.routes.api import (
|
||||
get_cleanup_settings,
|
||||
get_protected_contacts,
|
||||
_filter_contacts_by_criteria
|
||||
)
|
||||
from app.meshcore import cli
|
||||
@@ -323,12 +322,8 @@ def _cleanup_job():
|
||||
}
|
||||
logger.info(f"Filter criteria: types={criteria['types']}, date_field={criteria['date_field']}, days={criteria['days']}, name_filter='{criteria['name_filter']}'")
|
||||
|
||||
# Get protected contacts
|
||||
protected = get_protected_contacts()
|
||||
logger.info(f"Protected contacts count: {len(protected)}")
|
||||
|
||||
# Filter contacts (this function excludes protected contacts)
|
||||
matching_contacts = _filter_contacts_by_criteria(contacts, criteria, protected)
|
||||
# Filter contacts (this function internally excludes protected contacts)
|
||||
matching_contacts = _filter_contacts_by_criteria(contacts, criteria)
|
||||
|
||||
if not matching_contacts:
|
||||
logger.info("No contacts match cleanup criteria")
|
||||
|
||||
Reference in New Issue
Block a user