Fix incorrect identifier in create_hole.

Looks to have been accidentally introduced in 9575e11b8b, because
for some reason this is the only route that uses `name` instead of
`sub`. Weird. Perhaps worth changing to sub for consistency, but
surely there's some reason it's like this.
master
Snakes 2022-10-07 21:25:43 -04:00
parent 398c841632
commit 1966ccec6c
Signed by: Snakes
GPG Key ID: E745A82778055C7E
1 changed files with 1 additions and 1 deletions

View File

@ -330,7 +330,7 @@ def create_sub2(v):
if not valid_sub_regex.fullmatch(name):
return render_template("sub/create_hole.html", v=v, cost=HOLE_COST, error=f"{HOLE_NAME.capitalize()} name not allowed."), 400
sub = get_sub_by_name(sub, graceful=True)
sub = get_sub_by_name(name, graceful=True)
if not sub:
if v.coins < HOLE_COST:
return render_template("sub/create_hole.html", v=v, cost=HOLE_COST, error="You don't have enough coins!"), 403