rename variable to prevent future confusion
parent
65684ef3e8
commit
ee5748abd1
|
@ -28,7 +28,7 @@ description_regex = re.compile("[^<>&\n\t]{1,300}", flags=re.A)
|
|||
|
||||
badge_name_regex = re.compile(r"[^\/.]+", flags=re.A)
|
||||
|
||||
valid_sub_regex = re.compile("^[\w\-]{3,25}$", flags=re.A)
|
||||
hole_group_name_regex = re.compile("^[\w\-]{3,25}$", flags=re.A)
|
||||
|
||||
query_regex = re.compile("(\w+):(\S+)", flags=re.A)
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@ def create_group(v):
|
|||
if name.startswith('slots') or name.startswith('remindme'):
|
||||
abort(400, "You can't make a group with that name!")
|
||||
|
||||
if not valid_sub_regex.fullmatch(name):
|
||||
if not hole_group_name_regex.fullmatch(name):
|
||||
abort(400, "Name does not match the required format!")
|
||||
|
||||
if name in {'everyone', 'jannies', 'followers', 'commenters'} or g.db.get(Group, name):
|
||||
|
|
|
@ -368,7 +368,7 @@ def create_sub2(v):
|
|||
if not name: abort(400)
|
||||
name = name.strip().lower()
|
||||
|
||||
if not valid_sub_regex.fullmatch(name):
|
||||
if not hole_group_name_regex.fullmatch(name):
|
||||
abort(400, "Name does not match the required format!")
|
||||
|
||||
if not v.charge_account('combined', HOLE_COST)[0]:
|
||||
|
|
Loading…
Reference in New Issue