diff --git a/utils.py b/utils.py index cc276af35..eb4bc2c65 100644 --- a/utils.py +++ b/utils.py @@ -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