diff --git a/web/server/codechecker_server/api/report_server.py b/web/server/codechecker_server/api/report_server.py index f2980cb02b..7d634a45c1 100644 --- a/web/server/codechecker_server/api/report_server.py +++ b/web/server/codechecker_server/api/report_server.py @@ -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