Use function to check for dict

main
Bob Mottram 2021-07-05 10:51:07 +01:00
parent 4ba64797ef
commit 8ae7262e9a
1 changed files with 1 additions and 1 deletions

View File

@ -1302,7 +1302,7 @@ def _deleteHashtagsOnPost(baseDir: str, postJsonObject: {}) -> None:
"""Removes hashtags when a post is deleted
"""
removeHashtagIndex = False
if isinstance(postJsonObject['object'], dict):
if hasObjectDict(postJsonObject):
if postJsonObject['object'].get('content'):
if '#' in postJsonObject['object']['content']:
removeHashtagIndex = True