Don't save to cache for public only posts

main2
Bob Mottram 2019-10-19 11:35:45 +01:00
parent 966baef1cd
commit b3e205c7c2
1 changed files with 10 additions and 8 deletions

View File

@ -2115,9 +2115,11 @@ def individualPostAsHtml(iconsDir: str,translate: {}, \
else: else:
postStr=galleryStr postStr=galleryStr
if not showPublicOnly:
# save to posts cache on file # save to posts cache on file
if not os.path.isdir(htmlPostCacheDir): if not os.path.isdir(htmlPostCacheDir):
os.mkdir(htmlPostCacheDir) os.mkdir(htmlPostCacheDir)
try: try:
with open(cachedPostFilename, 'w') as fp: with open(cachedPostFilename, 'w') as fp:
fp.write(postStr) fp.write(postStr)