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)
image = process_image(oldname)
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:
li = sorted(os.listdir(f'files/assets/images/{SITE_NAME}/sidebar'),
key=lambda e: int(e.split('.webp')[0]))[-1]
@ -239,7 +239,7 @@ def comment(v):
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:
f.write('\n{[para]}\n' + body)

View File

@ -842,7 +842,7 @@ def submit_post(v, sub=None):
if len(url) > 2048:
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 = []
for i in bet_regex.finditer(body):
bets.append(i.group(1))
@ -929,7 +929,7 @@ def submit_post(v, sub=None):
)
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:
bet = SubmissionOption(
submission_id=post.id,