Skip to content

Commit 04bfca3

Browse files
committed
Fix get_findings()
1 parent 03b4e0b commit 04bfca3

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

sonar/branches.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -317,13 +317,15 @@ def rename(self, new_name: str) -> bool:
317317
Branch.CACHE.put(self)
318318
return True
319319

320-
def get_findings(self) -> dict[str, object]:
320+
def get_findings(self, filters: Optional[types.ApiParams] = None) -> dict[str, object]:
321321
"""Returns a branch list of findings
322322
323323
:return: dict of Findings, with finding key as key
324324
:rtype: dict{key: Finding}
325325
"""
326-
return self.get_issues() | self.get_hotspots()
326+
if not filters:
327+
return self.concerned_object.get_findings(branch=self.name)
328+
return self.get_issues(filters) | self.get_hotspots(filters)
327329

328330
def component_data(self) -> dict[str, str]:
329331
"""Returns key data"""

0 commit comments

Comments
 (0)