Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions dojo/reports/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -816,7 +816,7 @@ def get(self, request):
writer = csv.writer(response)
allowed_attributes = get_attributes()
excludes_list = get_excludes()
allowed_foreign_keys = get_attributes()
allowed_foreign_keys = get_foreign_keys()
first_row = True

for finding in findings:
Expand Down Expand Up @@ -940,10 +940,11 @@ def get(self, request):
self.font_bold = font_bold
allowed_attributes = get_attributes()
excludes_list = get_excludes()
allowed_foreign_keys = get_attributes()
allowed_foreign_keys = get_foreign_keys()

row_num = 1
for finding in findings:
logger.debug(f"processing finding: {finding.id}")
if row_num == 1:
col_num = 1
for key in dir(finding):
Expand All @@ -955,7 +956,7 @@ def get(self, request):
cell.font = font_bold
col_num += 1
except Exception as exc:
logger.error("Error in attribute: " + str(exc))
logger.warning(f"Error in attribute: {key}" + str(exc))
cell = worksheet.cell(row=row_num, column=col_num, value=key)
col_num += 1
continue
Expand Down Expand Up @@ -1007,7 +1008,7 @@ def get(self, request):
worksheet.cell(row=row_num, column=col_num, value=value)
col_num += 1
except Exception as exc:
logger.error("Error in attribute: " + str(exc))
logger.warning(f"Error in attribute: {key}" + str(exc))
worksheet.cell(row=row_num, column=col_num, value="Value not supported")
col_num += 1
continue
Expand Down