fix snappy dup detection for last quote
parent
c0a5bbc29e
commit
6cf5708f43
|
@ -248,7 +248,7 @@ def comment(v):
|
|||
if v.admin_level >= PERMS['USE_ADMIGGER_THREADS'] and posting_to_post and post_target.id == SNAPPY_THREAD and level == 1:
|
||||
with open(f"snappy_{SITE_NAME}.txt", "r+") as f:
|
||||
body_for_checking = '\n[para]\n' + body.lower() + '\n[para]\n'
|
||||
if body_for_checking in f.read().lower():
|
||||
if body_for_checking in f.read().lower() + '[para]\n':
|
||||
abort(400, "Snappy quote already exists!")
|
||||
f.write('[para]\n' + body + '\n')
|
||||
SNAPPY_QUOTES.append(body)
|
||||
|
|
Loading…
Reference in New Issue