mirror of https://gitlab.com/bashrc2/epicyon
Check if index exists
parent
0e3c41db2b
commit
a17e2b1ad2
14
utils.py
14
utils.py
|
@ -464,12 +464,14 @@ def deletePost(baseDir: str, httpPrefix: str,
|
||||||
return
|
return
|
||||||
|
|
||||||
# remove from recent posts cache in memory
|
# remove from recent posts cache in memory
|
||||||
postId = \
|
if recentPostsCache:
|
||||||
postJsonObject['id'].replace('/activity', '').replace('/', '#')
|
postId = \
|
||||||
if postId in recentPostsCache['index']:
|
postJsonObject['id'].replace('/activity', '').replace('/', '#')
|
||||||
recentPostsCache['index'].remove(postId)
|
if recentPostsCache.get('index'):
|
||||||
if recentPostsCache['json'].get(postId):
|
if postId in recentPostsCache['index']:
|
||||||
del recentPostsCache['json'][postId]
|
recentPostsCache['index'].remove(postId)
|
||||||
|
if recentPostsCache['json'].get(postId):
|
||||||
|
del recentPostsCache['json'][postId]
|
||||||
|
|
||||||
# remove any attachment
|
# remove any attachment
|
||||||
removeAttachment(baseDir, httpPrefix, domain, postJsonObject)
|
removeAttachment(baseDir, httpPrefix, domain, postJsonObject)
|
||||||
|
|
Loading…
Reference in New Issue