Fix returning caller eligibility — 1+ calls, not 2+
The 2+ requirement created a catch-22: regulars couldn't return because they needed 2 calls, but couldn't get a second call without returning. Dynamic count already prevents flooding. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -44,7 +44,7 @@ class RegularCallerService:
|
||||
import random
|
||||
if not self._regulars:
|
||||
return []
|
||||
available = [r for r in self._regulars if len(r.get("call_history", [])) > 1]
|
||||
available = [r for r in self._regulars if len(r.get("call_history", [])) > 0]
|
||||
if not available:
|
||||
return []
|
||||
return random.sample(available, min(count, len(available)))
|
||||
|
||||
Reference in New Issue
Block a user