Checking each recipient via Recipient.is_user_allowed() inside the loop issued one AllowedUser query per restricted recipient (N+1). Fetch all matching AllowedUser rows for the plan's recipients in a single query up front instead. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| gooyal_oauth2 | ||
| promotions | ||
| users | ||
| __init__.py | ||