mirror of
https://github.com/qodo-ai/pr-agent.git
synced 2025-12-12 19:05:18 +00:00
Add null and type checks for 'pr_files' in _prepare_file_labels method in pr_description.py
This commit is contained in:
parent
a6f772c6d5
commit
03b194c337
1 changed files with 2 additions and 1 deletions
|
|
@ -508,7 +508,8 @@ extra_file_yaml =
|
||||||
|
|
||||||
def _prepare_file_labels(self):
|
def _prepare_file_labels(self):
|
||||||
file_label_dict = {}
|
file_label_dict = {}
|
||||||
if not self.data or 'pr_files' not in self.data:
|
if (not self.data or not isinstance(self.data, dict) or
|
||||||
|
'pr_files' not in self.data or not self.data['pr_files']):
|
||||||
return file_label_dict
|
return file_label_dict
|
||||||
for file in self.data['pr_files']:
|
for file in self.data['pr_files']:
|
||||||
try:
|
try:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue