Skip to content

Commit 300e885

Browse files
mjunaidcaclaude
andcommitted
fix(notification): Add session.refresh in reminders handler
Same greenlet bug as task-events - need to refresh after commit before accessing notification attributes. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 0111c10 commit 300e885

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

  • apps/notification-service/src/notification_service/routers

apps/notification-service/src/notification_service/routers/dapr.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ async def handle_reminders(
129129
)
130130
session.add(notification)
131131
await session.commit()
132+
await session.refresh(notification) # Refresh to get user_id without lazy load
132133
logger.info("[DAPR] Created reminder notification for user %s", notification.user_id)
133134

134135
return {"status": "SUCCESS"}

0 commit comments

Comments
 (0)