Check that hashtag name exists

merge-requests/6/head
Bob Mottram 2019-12-12 12:57:08 +00:00
parent 1a94e9b239
commit 95f46cf276
1 changed files with 2 additions and 0 deletions

View File

@ -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):