Skip to content

Commit

Permalink
Merge pull request #165 from taigaio/mga/20240708/perf-tune-filter
Browse files Browse the repository at this point in the history
perf: Apply condition to a subquery
  • Loading branch information
CarlosLVar authored Jul 8, 2024
2 parents 8851435 + 11b7582 commit 65814d1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions taiga/projects/userstories/services.py
Original file line number Diff line number Diff line change
Expand Up @@ -813,6 +813,7 @@ def _get_userstories_assigned_users(project, queryset):
WHERE {where} AND "userstories_userstory"."id" NOT IN (
SELECT "userstories_userstory_assigned_users"."userstory_id" FROM
"userstories_userstory_assigned_users"
WHERE "userstories_userstory_assigned_users"."userstory_id" = "userstories_userstory"."id"
) AND "userstories_userstory"."assigned_to_id" IS NULL
GROUP BY "username";
""".format(where=where)
Expand Down

0 comments on commit 65814d1

Please sign in to comment.