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