From 1008c3b71f136ecd0634c12a9ee60597af815bf0 Mon Sep 17 00:00:00 2001 From: justcool393 Date: Sat, 5 Nov 2022 00:49:12 -0500 Subject: [PATCH] houses: don't allow users to pick the same house --- files/routes/settings.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/files/routes/settings.py b/files/routes/settings.py index 92a26c8b1..78d5e9c50 100644 --- a/files/routes/settings.py +++ b/files/routes/settings.py @@ -275,9 +275,11 @@ def settings_profile_post(v): house = request.values.get("house") if house and house in ("None","Furry","Femboy","Vampire","Racist") and FEATURES['HOUSES']: if v.bite: abort(403) - - if v.house: cost = 2000 - else: cost = 500 + if v.house: + if v.house.replace(' Founder', '') == house: abort(409, f"You're already in House {house}") + cost = 2000 + else: + cost = 500 success = v.charge_account('coins', cost) if not success: @@ -294,7 +296,6 @@ def settings_profile_post(v): if updated: g.db.add(v) - return {"message": "Your settings have been updated."} else: