mirror of
https://github.com/pyMC-dev/pyMC_Repeater.git
synced 2026-07-06 09:52:37 +02:00
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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user