fix 500 error

master
Aevann 2024-07-23 00:42:30 +03:00
parent 2dded46201
commit b3f816a039
1 changed files with 6 additions and 5 deletions

View File

@ -1046,11 +1046,12 @@ def settings_pronouns_change(v):
if pronouns and not pronouns_regex.fullmatch(pronouns):
abort(400, "The pronouns you entered don't match the required format!")
bare_pronouns = pronouns.lower().replace('/', '')
if bare_pronouns.startswith('nig'):
pronouns = 'BI/POC'
elif bare_pronouns.startswith('fag'):
pronouns = 'cute/twink'
if pronouns:
bare_pronouns = pronouns.lower().replace('/', '')
if bare_pronouns.startswith('nig'):
pronouns = 'BI/POC'
elif bare_pronouns.startswith('fag'):
pronouns = 'cute/twink'
v.pronouns = pronouns
g.db.add(v)