mirror of https://gitlab.com/bashrc2/epicyon
Itterate through list
parent
b89c2b7dcd
commit
8c8c279cd0
4
utils.py
4
utils.py
|
@ -2567,6 +2567,8 @@ def validUrlPrefix(url: str) -> bool:
|
||||||
def getActorLanguagesList(actorJson: {}) -> []:
|
def getActorLanguagesList(actorJson: {}) -> []:
|
||||||
"""Returns a list containing languages used by the given actor
|
"""Returns a list containing languages used by the given actor
|
||||||
"""
|
"""
|
||||||
|
if not actorJson.get('attachment'):
|
||||||
|
return []
|
||||||
for propertyValue in actorJson['attachment']:
|
for propertyValue in actorJson['attachment']:
|
||||||
if not propertyValue.get('name'):
|
if not propertyValue.get('name'):
|
||||||
continue
|
continue
|
||||||
|
@ -2591,7 +2593,7 @@ def getActorLanguages(actorJson: {}) -> str:
|
||||||
if not langList:
|
if not langList:
|
||||||
return ''
|
return ''
|
||||||
languagesStr = ''
|
languagesStr = ''
|
||||||
for lang in languagesStr:
|
for lang in langList:
|
||||||
if languagesStr:
|
if languagesStr:
|
||||||
languagesStr += ' / ' + lang
|
languagesStr += ' / ' + lang
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue