Fix broken joinedload and import path in reviews/activities endpoints

joinedload("reviewer") used a string instead of a class-bound
attribute (rejected by SQLAlchemy 2.x), and models.submission was the
wrong import path for Submission. Both endpoints 500'd whenever
actually called; surfaced while wiring real dashboard/activity data
into the frontend.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-17 04:46:43 +08:00
parent 61ee1a7364
commit c63a71883b
9 changed files with 2 additions and 1074 deletions
+1 -2
View File
@@ -302,10 +302,9 @@ class ActivityService:
"""Get activities excluding those related to deleted records."""
from sqlalchemy import and_, or_, desc
from datetime import datetime, timedelta
from models.task import Task
from models.task import Task, Submission
from models.shot import Shot
from models.asset import Asset
from models.submission import Submission
query = db.query(Activity)