Skip to content

Commit

Permalink
api: Fix GrantsReceivedView performance
Browse files Browse the repository at this point in the history
  • Loading branch information
R2ZER0 committed Mar 18, 2024
1 parent 5a83c6a commit eea94e2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions datastore/api/org/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,6 @@ def get_queryset(self):
if not models.Organisation.exists(org_id):
raise rest_framework.exceptions.NotFound()

return db.Latest.grants().filter(
data__recipientOrganization__contains=[{"id": org_id}]
)
return db.Grant.objects.filter(
source_file__latest__series=db.Latest.CURRENT
).filter(recipient_org_ids__contains=[org_id])

0 comments on commit eea94e2

Please sign in to comment.