Skip to content

Commit

Permalink
fix: curator statistics releases query
Browse files Browse the repository at this point in the history
filter by a list of ids instead of trying to combine two querysets

resolves comses/planning#190
  • Loading branch information
sgfost committed Nov 13, 2023
1 parent f483ab2 commit 3b9ec7a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion django/library/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,8 @@ def updated_after(self, start_date, end_date=None, **kwargs):
updated_codebases = updated_codebases.difference(new_codebases)
releases = CodebaseRelease.objects.filter(
id__in=(
new_codebases.values("releases") | updated_codebases.values("releases")
list(new_codebases.values_list("releases", flat=True))
+ list(updated_codebases.values_list("releases", flat=True))
)
)
return new_codebases, updated_codebases, releases
Expand Down

0 comments on commit 3b9ec7a

Please sign in to comment.