fix(api): Code formatting

This commit is contained in:
AaronBenDaniel
2025-06-10 11:06:23 -04:00
parent 1db3f82f15
commit 6e93f743f3
2 changed files with 9 additions and 7 deletions
+7 -5
View File
@@ -111,9 +111,9 @@ class PDFGenerator(AbstractGenerator):
if not img_data: if not img_data:
continue continue
img_tag[ img_tag["src"] = (
"src" f"data:image/jpg;base64,{b64encode(img_data).decode()}"
] = f"data:image/jpg;base64,{b64encode(img_data).decode()}" )
data[part["id"]] = tree.prettify() data[part["id"]] = tree.prettify()
@@ -137,9 +137,11 @@ class PDFGenerator(AbstractGenerator):
"description": self.story["description"], "description": self.story["description"],
"avatar": b64encode(self.author).decode(), "avatar": b64encode(self.author).decode(),
"copyright": { "copyright": {
"data": b64encode(copyright["asset"].read_bytes()).decode() "data": (
b64encode(copyright["asset"].read_bytes()).decode()
if copyright["asset"] if copyright["asset"]
else "", else ""
),
"name": copyright["name"], "name": copyright["name"],
}, },
"parts": parts, "parts": parts,