mirror of
https://github.com/morpheus65535/bazarr
synced 2025-02-20 13:07:03 +00:00
In some places the variable 'profile_id' holds the value 'null' where the code expects an int or None (#1395)
This commit is contained in:
parent
4ee33e6e4e
commit
bd16279601
1 changed files with 4 additions and 4 deletions
|
@ -293,7 +293,7 @@ def get_profiles_list(profile_id=None):
|
|||
if not len(profile_id_list):
|
||||
update_profile_id_list()
|
||||
|
||||
if profile_id:
|
||||
if profile_id and profile_id != 'null':
|
||||
for profile in profile_id_list:
|
||||
if profile['profileId'] == profile_id:
|
||||
return profile
|
||||
|
@ -307,7 +307,7 @@ def get_desired_languages(profile_id):
|
|||
if not len(profile_id_list):
|
||||
update_profile_id_list()
|
||||
|
||||
if profile_id:
|
||||
if profile_id and profile_id != 'null':
|
||||
for profile in profile_id_list:
|
||||
profileId, name, cutoff, items = profile.values()
|
||||
if profileId == int(profile_id):
|
||||
|
@ -323,7 +323,7 @@ def get_profile_id_name(profile_id):
|
|||
if not len(profile_id_list):
|
||||
update_profile_id_list()
|
||||
|
||||
if profile_id:
|
||||
if profile_id and profile_id != 'null':
|
||||
for profile in profile_id_list:
|
||||
profileId, name, cutoff, items = profile.values()
|
||||
if profileId == int(profile_id):
|
||||
|
@ -339,7 +339,7 @@ def get_profile_cutoff(profile_id):
|
|||
if not len(profile_id_list):
|
||||
update_profile_id_list()
|
||||
|
||||
if profile_id:
|
||||
if profile_id and profile_id != 'null':
|
||||
cutoff_language = []
|
||||
for profile in profile_id_list:
|
||||
profileId, name, cutoff, items = profile.values()
|
||||
|
|
Loading…
Reference in a new issue