Skip to content

Commit

Permalink
Add null check for CodeShield demo notebook
Browse files Browse the repository at this point in the history
Reviewed By: csahana95

Differential Revision: D68748939

fbshipit-source-id: 810dc3ee87c9c1eee14eaf573a8e689dae338365
  • Loading branch information
SimonWan authored and facebook-github-bot committed Jan 28, 2025
1 parent ce55780 commit e923bdf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion CodeShield/notebook/CodeShieldUsageDemo.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
" print(\"\\t Recommended treatment: %s\\n\" % result.recommended_treatment)\n",
"\n",
" print (\"## Details:\\n\")\n",
" if len(result.issues_found) > 0:\n",
" if result.issues_found is not None and len(result.issues_found) > 0:\n",
" issue = result.issues_found[0]\n",
" print (\"\\tIssue found: \\n\\t\\tPattern id: %s \\n\\t\\tDescription: %s \\n\\t\\tSeverity: %s \\n\\t\\tLine number: %s\" % (issue.pattern_id, issue.description, issue.severity, issue.line))\n",
" \n",
Expand Down

0 comments on commit e923bdf

Please sign in to comment.