# record event on the most recent campaign_recipient for this email (if any) cr = (await db.execute( select(CampaignRecipient).where(CampaignRecipient.email == email) .order_by(CampaignRecipient.id.desc()).limit(1))).scalar() if cr: db.add(EmailEvent(campaign_id=cr.campaign_id, campaign_recipient_id=cr.id, event_type="unsubscribed", detail=f"Unsubscribed via token link from {email}")) rec.status = "unsubscribed" await db.commit() app/api/routers/recipients.py:102: sup, bounced = await _suppression_and_bounces(db) app/api/routers/recipients.py:104: rpt = recipient_service.validate_rows(records, sup, bounced, existing, app/api/routers/recipients.py:147: sup, bounced = await _suppression_and_bounces(db) app/api/routers/recipients.py:150: rpt = recipient_service.validate_rows(records, sup, bounced, existing, app/api/routers/recipients.py:176: sup, bounced = await _suppression_and_bounces(db)