From 29fffd4e810c38c990663fb6cc3c55b0a7c0cb12 Mon Sep 17 00:00:00 2001 From: morpheus65535 Date: Thu, 10 Jun 2021 06:48:45 -0400 Subject: [PATCH] Fixed language filter in history stats. --- bazarr/api.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/bazarr/api.py b/bazarr/api.py index 12b995ea3..9814c4c54 100644 --- a/bazarr/api.py +++ b/bazarr/api.py @@ -353,8 +353,12 @@ class Languages(Resource): def get(self): history = request.args.get('history') if history and history not in False_Keys: - languages = list(TableHistory.select(TableHistory.language).dicts()) - languages += list(TableHistoryMovie.select(TableHistoryMovie.language).dicts()) + languages = list(TableHistory.select(TableHistory.language) + .where(TableHistory.language != None) + .dicts()) + languages += list(TableHistoryMovie.select(TableHistoryMovie.language) + .where(TableHistoryMovie.language != None) + .dicts()) languages_set = set() for l in languages: if l not in None_Keys and l['language'] not in None_Keys: