From 98e4482054be3d744a1d8e5c887c9ac34db22bf7 Mon Sep 17 00:00:00 2001 From: MarekWo Date: Sun, 25 Jan 2026 19:54:13 +0100 Subject: [PATCH] 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 --- app/archiver/manager.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/app/archiver/manager.py b/app/archiver/manager.py index 50ec71f..22b8d37 100644 --- a/app/archiver/manager.py +++ b/app/archiver/manager.py @@ -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")