fix 500 errors

pull/213/head
Aevann 2023-10-11 23:53:12 +03:00
parent f40e6b9564
commit f58b6605a4
1 changed files with 4 additions and 3 deletions

View File

@ -384,9 +384,10 @@ def sanitize(sanitized, golden=True, limit_pings=0, showmore=False, count_emojis
if author.marsify and not author.chud:
sanitized = marsify(sanitized)
if obj.sharpened:
if obj and obj.sharpened:
sanitized = sharpen(sanitized)
if obj.queened:
if obj and obj.queened:
sanitized = queenify(sanitized)
if '```' not in sanitized and '<pre>' not in sanitized:
@ -683,7 +684,7 @@ def filter_emojis_only(title, golden=True, count_emojis=False, obj=None, author=
if author.marsify and not author.chud:
title = marsify(title)
if obj.sharpened:
if obj and obj.sharpened:
title = sharpen(title)
emojis_used = set()