Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions backend/airweave/api/deps.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,10 @@ async def _authenticate_auth0_user(
return None, AuthMethod.AUTH0, {}

# Update last active timestamp directly (can't use CRUD during auth flow)
user.last_active_at = datetime.utcnow()
user = await crud.user.update_user_no_auth(db, id=user.id, obj_in=user)
from airweave.schemas.user import UserUpdate

user_update = UserUpdate(last_active_at=datetime.utcnow())
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot Oct 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

UserUpdate ignores last_active_at because the schema lacks that field, so update_user_no_auth never persists the timestamp change.

Prompt for AI agents
Address the following comment on backend/airweave/api/deps.py at line 56:

<comment>UserUpdate ignores last_active_at because the schema lacks that field, so update_user_no_auth never persists the timestamp change.</comment>

<file context>
@@ -51,8 +51,10 @@ async def _authenticate_auth0_user(
-    user = await crud.user.update_user_no_auth(db, id=user.id, obj_in=user)
+    from airweave.schemas.user import UserUpdate
+
+    user_update = UserUpdate(last_active_at=datetime.utcnow())
+    user = await crud.user.update_user_no_auth(db, id=user.id, obj_in=user_update)
 
</file context>
Fix with Cubic

user = await crud.user.update_user_no_auth(db, id=user.id, obj_in=user_update)

user_context = schemas.User.model_validate(user)
return user_context, AuthMethod.AUTH0, {"auth0_id": auth0_user.id}
Expand Down
Loading