dont clean frontpage cache if its a comment that got pin-awarded

pull/219/head
Aevann 2023-12-03 19:46:43 +02:00
parent 24fc61fedf
commit 393f8b4a7c
1 changed files with 3 additions and 1 deletions

View File

@ -318,7 +318,9 @@ def award_thing(v, thing_type, id):
obj.stickied_utc = int(time.time()) + add
obj.stickied = f'{v.username}{PIN_AWARD_TEXT}'
cache.delete_memoized(frontlist)
if isinstance(obj. Post):
cache.delete_memoized(frontlist)
elif kind == "unpin":
if not obj.stickied_utc: abort(400)
if not obj.author.deflector or v == obj.author: