Check object

main
Bob Mottram 2019-12-02 16:08:26 +00:00
parent 02f6b6cba9
commit 964b8524b3
1 changed files with 5 additions and 4 deletions

View File

@ -331,10 +331,11 @@ def deletePost(baseDir: str,httpPrefix: str,nickname: str,domain: str,postFilena
# remove from moderation index file # remove from moderation index file
if hasObject: if hasObject:
if postJsonObject['object'].get('moderationStatus'): if isinstance(postJsonObject['object'], dict):
if postJsonObject.get('id'): if postJsonObject['object'].get('moderationStatus'):
postId=postJsonObject['id'].replace('/activity','') if postJsonObject.get('id'):
removeModerationPostFromIndex(baseDir,postId,debug) postId=postJsonObject['id'].replace('/activity','')
removeModerationPostFromIndex(baseDir,postId,debug)
# remove any hashtags index entries # remove any hashtags index entries
removeHashtagIndex=False removeHashtagIndex=False