Skip to content

Commit

Permalink
Add null check for 'suggestion' in publish_code_suggestions method in…
Browse files Browse the repository at this point in the history
… gitlab_provider.py
  • Loading branch information
mrT23 committed Aug 16, 2024
1 parent 3456c8e commit 4a71ec9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pr_agent/git_providers/gitlab_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ def get_relevant_diff(self, relevant_file: str, relevant_line_in_file: str) -> O
def publish_code_suggestions(self, code_suggestions: list) -> bool:
for suggestion in code_suggestions:
try:
if 'original_suggestion' in suggestion:
if suggestion and 'original_suggestion' in suggestion:
original_suggestion = suggestion['original_suggestion']
else:
original_suggestion = suggestion
Expand Down

0 comments on commit 4a71ec9

Please sign in to comment.