Refactor contact trimming logic for improved readability by consolidating function calls into single lines. Update related test cases for consistency.

This commit is contained in:
agessaman
2026-06-14 15:50:03 -07:00
parent 23078de78b
commit dcaa4ac949
2 changed files with 3 additions and 9 deletions
+1 -3
View File
@@ -418,9 +418,7 @@ class CompanionAPIEndpoints:
# that every other path honors. Trim favourite-aware (oldest non-favourites
# first) so persisted contacts never exceed max_contacts.
try:
removed = trim_companion_contacts_to_fit(
sqlite_handler, companion_hash, max_contacts
)
removed = trim_companion_contacts_to_fit(sqlite_handler, companion_hash, max_contacts)
except ValueError as exc:
raise cherrypy.HTTPError(
409,