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): if pronouns and not pronouns_regex.fullmatch(pronouns):
abort(400, "The pronouns you entered don't match the required format!") abort(400, "The pronouns you entered don't match the required format!")
bare_pronouns = pronouns.lower().replace('/', '') if pronouns:
if bare_pronouns.startswith('nig'): bare_pronouns = pronouns.lower().replace('/', '')
pronouns = 'BI/POC' if bare_pronouns.startswith('nig'):
elif bare_pronouns.startswith('fag'): pronouns = 'BI/POC'
pronouns = 'cute/twink' elif bare_pronouns.startswith('fag'):
pronouns = 'cute/twink'
v.pronouns = pronouns v.pronouns = pronouns
g.db.add(v) g.db.add(v)