fix(comments): address code review feedback

- Add onupdate=sa.func.now() to migration updated_at columns
- Use UserProfile.is_blocked.is_(False) instead of == False
- Fix British to American spelling (organised → organized)

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
Agent-Logs-Url: https://github.com/christianlouis/DocuElevate/sessions/3894af37-0f19-457b-8811-f1feb18b17ef
This commit is contained in:
copilot-swe-agent[bot]
2026-03-21 18:30:05 +00:00
parent ad795e200a
commit 4b6412734b
3 changed files with 5 additions and 10 deletions
+2 -7
View File
@@ -138,7 +138,7 @@ def _build_thread_tree(comments: list[DocumentComment]) -> list[dict[str, Any]]:
@router.get("/files/{file_id}/comments")
@require_login
def list_comments(request: Request, file_id: int, db: DbSession):
"""List all comments for a document, organised into threads.
"""List all comments for a document, organized into threads.
Returns a threaded tree where top-level comments contain nested
``replies``.
@@ -663,12 +663,7 @@ def list_mentionable_users(request: Request, db: DbSession):
Returns:
A list of ``{user_id, display_name}`` objects.
"""
profiles = (
db.query(UserProfile)
.filter(UserProfile.is_blocked == False) # noqa: E712
.order_by(UserProfile.display_name)
.all()
)
profiles = db.query(UserProfile).filter(UserProfile.is_blocked.is_(False)).order_by(UserProfile.display_name).all()
return [
{