Fixed integer conversion issue. #1918

This commit is contained in:
morpheus65535 2022-08-04 21:28:44 -04:00
parent 4382a05da1
commit b0abe81d12
1 changed files with 8 additions and 3 deletions

View File

@ -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