Fixed an issue with languages filter in history stats.

This commit is contained in:
morpheus65535 2021-06-11 23:48:38 -04:00
parent a3d0e1d192
commit de4ff35e05
1 changed files with 2 additions and 1 deletions

View File

@ -371,11 +371,12 @@ class Languages(Resource):
if not any(x['code2'] == code2 for x in languages_dicts): if not any(x['code2'] == code2 for x in languages_dicts):
languages_dicts.append({ languages_dicts.append({
'code2': code2, 'code2': code2,
'name': language_from_alpha2(language), 'name': language_from_alpha2(code2),
# Compatibility: Use false temporarily # Compatibility: Use false temporarily
'enabled': False 'enabled': False
}) })
return jsonify(sorted(languages_dicts, key=itemgetter('name'))) return jsonify(sorted(languages_dicts, key=itemgetter('name')))
result = TableSettingsLanguages.select(TableSettingsLanguages.name, result = TableSettingsLanguages.select(TableSettingsLanguages.name,
TableSettingsLanguages.code2, TableSettingsLanguages.code2,
TableSettingsLanguages.enabled)\ TableSettingsLanguages.enabled)\