mirror of
https://codeberg.org/rimu/pyfedi
synced 2025-02-02 16:21:32 -08:00
avoid invalid language id
This commit is contained in:
parent
2f15fd5aea
commit
3b76c0fe46
1 changed files with 2 additions and 1 deletions
|
@ -1156,7 +1156,8 @@ def languages_for_form():
|
|||
# but Language.query.filter(Language.id.in_(recently_used_language_ids)) isn't guaranteed to return
|
||||
# language results in the same order as that List :(
|
||||
for language_id in recently_used_language_ids:
|
||||
used_languages.append((language_id, ""))
|
||||
if language_id is not None:
|
||||
used_languages.append((language_id, ""))
|
||||
|
||||
# use 'English' as a default for brand new users (no posts or replies yet)
|
||||
# not great, but better than them accidently using 'Afaraf' (the first in a alphabetical list of languages)
|
||||
|
|
Loading…
Add table
Reference in a new issue