Reverse logic

merge-requests/30/head
Bob Mottram 2021-03-23 14:50:40 +00:00
parent 5a178a28d6
commit 7c58e89f0b
1 changed files with 3 additions and 1 deletions

View File

@ -583,7 +583,7 @@ def _getImageDescription(postJsonObject: {}) -> str:
def _showLikesOnPost(postJsonObject: {}, maxLikes: int) -> None:
"""Shows the likes on a post
"""
if postJsonObject.get('object'):
if not postJsonObject.get('object'):
return
if not isinstance(postJsonObject['object'], dict):
return
@ -593,6 +593,8 @@ def _showLikesOnPost(postJsonObject: {}, maxLikes: int) -> None:
return
if not postJsonObject['object']['likes'].get('items'):
return
if not isinstance(postJsonObject['object']['likes']['items'], list):
return
print('')
ctr = 0
for item in postJsonObject['object']['likes']['items']: