dev #19

Merged
profitroll merged 98 commits from dev into master 2023-04-24 13:48:22 +03:00
Showing only changes of commit fcd59b7aca - Show all commits

View File

@ -70,10 +70,10 @@ async def send_content(app: PosterClient) -> None:
del response
submitted_caption = col_submitted.find_one( {"temp.file": pic[1]} )
submitted = col_submitted.find_one({"temp.file": pic[1]})
if submitted_caption is not None:
caption = submitted_caption["caption"].strip()
if submitted is not None and submitted["caption"] is not None:
caption = submitted["caption"].strip()
else:
caption = ""
@ -100,7 +100,7 @@ async def send_content(app: PosterClient) -> None:
"image": pic[0],
"filename": pic[1],
"channel": configGet("channel", "posting"),
"caption": None if submitted_caption is None else submitted_caption["caption"].strip()
"caption": None if (submitted is None or submitted["caption"] is None) else submitted["caption"].strip()
}
)