Skip to content

Commit

Permalink
Merge pull request #4215 from bruntib/report_order
Browse files Browse the repository at this point in the history
[fix] Prevent overlapping report groups
  • Loading branch information
cservakt authored Apr 15, 2024
2 parents 695cce5 + f939e01 commit 6e06e62
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions web/server/codechecker_server/api/report_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -2089,6 +2089,13 @@ def getRunResults(self, run_ids, limit, offset, sort_types,
sort_type_map,
order_type_map)

# Most queries are using paging of reports due their great
# number. This is implemented by LIMIT and OFFSET in the SQL
# queries. However, if there is no ordering in the query, then
# the reports in different pages may overlap. This ordering
# prevents it.
q = q.order_by(Report.id)

if report_filter.annotations is not None:
annotations = defaultdict(list)
for annotation in report_filter.annotations:
Expand Down

0 comments on commit 6e06e62

Please sign in to comment.