mirror of https://gitlab.com/bashrc2/epicyon
Check that hashtag name exists
parent
1a94e9b239
commit
95f46cf276
2
utils.py
2
utils.py
|
@ -354,6 +354,8 @@ def deletePost(baseDir: str,httpPrefix: str,nickname: str,domain: str,postFilena
|
||||||
for tag in postJsonObject['object']['tag']:
|
for tag in postJsonObject['object']['tag']:
|
||||||
if tag['type']!='Hashtag':
|
if tag['type']!='Hashtag':
|
||||||
continue
|
continue
|
||||||
|
if not tag.get('name'):
|
||||||
|
continue
|
||||||
# find the index file for this tag
|
# find the index file for this tag
|
||||||
tagIndexFilename=baseDir+'/tags/'+tag['name'][1:]+'.txt'
|
tagIndexFilename=baseDir+'/tags/'+tag['name'][1:]+'.txt'
|
||||||
if not os.path.isfile(tagIndexFilename):
|
if not os.path.isfile(tagIndexFilename):
|
||||||
|
|
Loading…
Reference in New Issue