Fix submitter agency not loading in flagged/resolved audit queries
The selectinload for FlaggedItem.submitter and ResolvedItem.submitter was not chaining .selectinload(User.agency), so the submitter's agency was always None in the API response. This caused the "Submit Agency" column to be empty in the Flags and Resolutions tabs of the Auditing page. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
3508154693
commit
99fa956c74
1 changed files with 2 additions and 2 deletions
|
|
@ -46,7 +46,7 @@ class AuditRepository:
|
|||
selectinload(FlaggedItem.proof_version)
|
||||
.selectinload(ProofVersion.proof)
|
||||
.selectinload(Proof.campaign),
|
||||
selectinload(FlaggedItem.submitter),
|
||||
selectinload(FlaggedItem.submitter).selectinload(User.agency),
|
||||
)
|
||||
.join(ProofVersion)
|
||||
.join(Proof)
|
||||
|
|
@ -93,7 +93,7 @@ class AuditRepository:
|
|||
selectinload(ResolvedItem.proof_version)
|
||||
.selectinload(ProofVersion.proof)
|
||||
.selectinload(Proof.campaign),
|
||||
selectinload(ResolvedItem.submitter),
|
||||
selectinload(ResolvedItem.submitter).selectinload(User.agency),
|
||||
)
|
||||
.join(ProofVersion)
|
||||
.join(Proof)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue