Skip to content
This repository has been archived by the owner on Sep 17, 2021. It is now read-only.

Commit

Permalink
Fix an issue in the API where a null auditor_setting throws an except…
Browse files Browse the repository at this point in the history
…ion.

- The ItemAudit's auditor_setting_id can be null. Not sure why, but if it's null
  it raises an Exception. This will ignore this and skip showing the issues in these cases.
  • Loading branch information
Mike Grima committed Sep 8, 2020
1 parent f7e51dd commit 899b74f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion security_monkey/views/item.py
Expand Up @@ -113,7 +113,7 @@ def get(self, item_id):
retval['comments'] = comments_marshaled

for issue in result.issues:
if issue.auditor_setting.disabled:
if not issue.auditor_setting or issue.auditor_setting.disabled:
continue
issue_marshaled = marshal(issue.__dict__, AUDIT_FIELDS)
if issue.user is not None:
Expand Down

0 comments on commit 899b74f

Please sign in to comment.