Handle posts without text

main
Bob Mottram 2021-07-23 15:32:21 +01:00
parent 0c36d99e28
commit 946c10e3aa
1 changed files with 2 additions and 0 deletions

View File

@ -852,6 +852,8 @@ def _genderFromString(translate: {}, text: str) -> str:
"""Given some text, does it contain a gender description?
"""
gender = None
if not text:
return None
textOrig = text
text = text.lower()
if translate['He/Him'].lower() in text or \