Add null and type checks for 'pr_files' in _prepare_file_labels method in pr_description.py

This commit is contained in:
mrT23
2024-08-18 08:21:32 +03:00
parent a6f772c6d5
commit 03b194c337

View File

@ -508,7 +508,8 @@ extra_file_yaml =
def _prepare_file_labels(self):
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
for file in self.data['pr_files']:
try: