In some places the variable 'profile_id' holds the value 'null' where the code expects an int or None (#1395)

pull/1396/head
Michiel van Baak Jansen 3 years ago committed by GitHub
parent 4ee33e6e4e
commit bd16279601
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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…
Cancel
Save