convert some more >s to >=s

master
justcool393 2022-10-06 01:40:21 -07:00
parent 397cf68abd
commit e93e2d9ca9
2 changed files with 4 additions and 4 deletions

View File

@ -196,7 +196,7 @@ def comment(v):
file.save(oldname) file.save(oldname)
image = process_image(oldname) image = process_image(oldname)
if image == "": return {"error":"Image upload failed"}, 400 if image == "": return {"error":"Image upload failed"}, 400
if v.admin_level > PERMS['SITE_SETTINGS_SIDEBARS_BANNERS_BADGES'] and level == 1: if v.admin_level >= PERMS['SITE_SETTINGS_SIDEBARS_BANNERS_BADGES'] and level == 1:
if parent_post.id == SIDEBAR_THREAD: if parent_post.id == SIDEBAR_THREAD:
li = sorted(os.listdir(f'files/assets/images/{SITE_NAME}/sidebar'), li = sorted(os.listdir(f'files/assets/images/{SITE_NAME}/sidebar'),
key=lambda e: int(e.split('.webp')[0]))[-1] key=lambda e: int(e.split('.webp')[0]))[-1]
@ -239,7 +239,7 @@ def comment(v):
body = body.strip() body = body.strip()
if v.admin_level > PERMS['SITE_SETTINGS_SNAPPY_QUOTES'] and parent_post.id == SNAPPY_THREAD and level == 1: if v.admin_level >= PERMS['SITE_SETTINGS_SNAPPY_QUOTES'] and parent_post.id == SNAPPY_THREAD and level == 1:
with open(f"snappy_{SITE_NAME}.txt", "a", encoding="utf-8") as f: with open(f"snappy_{SITE_NAME}.txt", "a", encoding="utf-8") as f:
f.write('\n{[para]}\n' + body) f.write('\n{[para]}\n' + body)

View File

@ -842,7 +842,7 @@ def submit_post(v, sub=None):
if len(url) > 2048: if len(url) > 2048:
return error("There's a 2048 character limit for URLs.") return error("There's a 2048 character limit for URLs.")
if v and v.admin_level > PERMS['POST_BETS']: if v and v.admin_level >= PERMS['POST_BETS']:
bets = [] bets = []
for i in bet_regex.finditer(body): for i in bet_regex.finditer(body):
bets.append(i.group(1)) bets.append(i.group(1))
@ -929,7 +929,7 @@ def submit_post(v, sub=None):
) )
g.db.add(choice) g.db.add(choice)
if v and v.admin_level > PERMS['POST_BETS']: if v and v.admin_level >= PERMS['POST_BETS']:
for bet in bets: for bet in bets:
bet = SubmissionOption( bet = SubmissionOption(
submission_id=post.id, submission_id=post.id,