Skip to content

Commit

Permalink
fix/correct isMonitored project attribute (#183)
Browse files Browse the repository at this point in the history
* changed isMonitored project attribute to check status of project

* fix: fix formatting

---------

Co-authored-by: Nathan Roys <[email protected]>
  • Loading branch information
olegshprengelsnyk and nathan-roys authored Aug 2, 2023
1 parent c0a783e commit 76f61c5
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions snyk/managers.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,9 +152,7 @@ def _rest_to_v1_response_format(self, project):
"type": attributes.get("type"),
"readOnly": attributes.get("read_only"),
"testFrequency": recurring_tests.get("frequency"),
"isMonitored": True
if project.get("meta", {}).get("cli_monitored_at")
else False,
"isMonitored": True if attributes.get("status") == "active" else False,
"issueCountsBySeverity": {
"low": issue_counts.get("low"),
"medium": issue_counts.get("medium"),
Expand Down

0 comments on commit 76f61c5

Please sign in to comment.