Skip to content

Commit

Permalink
Fixed integer conversion issue. #1918
Browse files Browse the repository at this point in the history
  • Loading branch information
morpheus65535 committed Aug 5, 2022
1 parent 4382a05 commit b0abe81
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions bazarr/app/database.py
Expand Up @@ -436,9 +436,14 @@ def get_desired_languages(profile_id):
if profile_id and profile_id != 'null':
for profile in profile_id_list:
profileId, name, cutoff, items, mustContain, mustNotContain, originalFormat = profile.values()
if profileId == int(profile_id):
languages = [x['language'] for x in items]
break
try:
profile_id_int = int(profile_id)
except ValueError:
continue
else:
if profileId == profile_id_int:
languages = [x['language'] for x in items]
break

return languages

Expand Down

0 comments on commit b0abe81

Please sign in to comment.