diff --git a/utils.py b/utils.py index 6c059ca76..945b8fef8 100644 --- a/utils.py +++ b/utils.py @@ -354,6 +354,8 @@ def deletePost(baseDir: str,httpPrefix: str,nickname: str,domain: str,postFilena for tag in postJsonObject['object']['tag']: if tag['type']!='Hashtag': continue + if not tag.get('name'): + continue # find the index file for this tag tagIndexFilename=baseDir+'/tags/'+tag['name'][1:]+'.txt' if not os.path.isfile(tagIndexFilename):