mirror of
https://github.com/qodo-ai/pr-agent.git
synced 2025-07-05 21:30:40 +08:00
Add null check for 'suggestion' in publish_code_suggestions method in gitlab_provider.py
This commit is contained in:
@ -327,7 +327,7 @@ class GitLabProvider(GitProvider):
|
|||||||
def publish_code_suggestions(self, code_suggestions: list) -> bool:
|
def publish_code_suggestions(self, code_suggestions: list) -> bool:
|
||||||
for suggestion in code_suggestions:
|
for suggestion in code_suggestions:
|
||||||
try:
|
try:
|
||||||
if 'original_suggestion' in suggestion:
|
if suggestion and 'original_suggestion' in suggestion:
|
||||||
original_suggestion = suggestion['original_suggestion']
|
original_suggestion = suggestion['original_suggestion']
|
||||||
else:
|
else:
|
||||||
original_suggestion = suggestion
|
original_suggestion = suggestion
|
||||||
|
Reference in New Issue
Block a user