Skip to content

Commit

Permalink
minor change
Browse files Browse the repository at this point in the history
  • Loading branch information
zhu0619 committed May 17, 2024
1 parent 021c11e commit d73f685
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions auroris/report/broadcaster/_html.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,11 @@ def broadcast(self):
src = f"data:image/png;base64,{image_data}"
else:
# Save as separate file
filename = (
f"{re.sub(r'[^\w\-\.]', '_', image.title)}.png"
if image.title is not None
else f"{image_counter}.png"
)
if image.title:
filename = f"{re.sub(r'[^\w\-\.]', '_', image.title)}.png"
else:
filename = f"{image_counter}.png"

path = dm.fs.join(self._image_dir, filename)
save_image(image.image, path, self._destination)
src = path2url(path, self._destination)
Expand Down

0 comments on commit d73f685

Please sign in to comment.