Skip to content

Commit

Permalink
fix: handle NoneType for owner_name in feel job
Browse files Browse the repository at this point in the history
don't crash if pytesseract is not installed or not working
  • Loading branch information
mastrolube committed Mar 22, 2024
1 parent dbeb334 commit aa8d28b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion GramAddict/core/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -994,7 +994,7 @@ def _check_if_ad_or_hashtag(
resourceId=ResourceID.SECONDARY_LABEL,
)

owner_name = post_owner_obj.get_text() or post_owner_obj.get_desc()
owner_name = post_owner_obj.get_text() or post_owner_obj.get_desc() or ""
if not owner_name:
logger.info("Can't find the owner name, need to use OCR.")
try:
Expand Down

0 comments on commit aa8d28b

Please sign in to comment.