fix(api): Code formatting
This commit is contained in:
@@ -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,
|
||||||
|
|||||||
Reference in New Issue
Block a user