Skip to content

Commit

Permalink
Add implementation to missing reports api
Browse files Browse the repository at this point in the history
  • Loading branch information
vodorok committed Oct 30, 2024
1 parent 196e2c0 commit b436f2a
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions web/server/codechecker_server/api/report_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -3906,8 +3906,14 @@ def getMissingReportSuperHashes(self, report_super_hashes):
Returns the list of reports that the server does not have.
"""
self.__require_store()
# TODO implemet proper filtering based on the input hashes
return [report_super_hashes[0]]
if not report_super_hashes:
return []

with DBSession(self._Session) as session:
q = session.query(Report) \
.options(sqlalchemy.orm.load_only('super_hash')) \

return list(set(report_super_hashes) - set(list(set(report.super_hash for report in q))))

@exc_to_thrift_reqfail
@timeit
Expand Down

0 comments on commit b436f2a

Please sign in to comment.