Better check for presence of orderedItems

merge-requests/30/head
Bob Mottram 2021-08-02 11:50:32 +01:00
parent fdbdfaa9b5
commit 5a442c1d3c
2 changed files with 1 additions and 7 deletions

View File

@ -3374,8 +3374,6 @@ def _createBoxIndexed(recentPostsCache: {},
if postUrl in recentPostsCache['index']:
if recentPostsCache['json'].get(postUrl):
url = recentPostsCache['json'][postUrl]
print('Adding post to timeline: ' +
boxname + ' ' + url)
if _addPostStringToTimeline(url,
boxname, postsInBox,
boxActor):
@ -3395,8 +3393,6 @@ def _createBoxIndexed(recentPostsCache: {},
if os.path.isfile(fullPostFilename + '.reject'):
continue
print('Adding post to timeline: ' +
boxname + ' ' + fullPostFilename)
if _addPostToTimeline(fullPostFilename, boxname,
postsInBox, boxActor):
postsAddedToTimeline += 1
@ -3413,8 +3409,6 @@ def _createBoxIndexed(recentPostsCache: {},
locatePost(baseDir, timelineNickname,
originalDomain, postUrl, False)
if fullPostFilename:
print('Adding post to timeline: ' +
boxname + ' ' + fullPostFilename)
if _addPostToTimeline(fullPostFilename, boxname,
postsInBox, boxActor):
postsAddedToTimeline += 1

View File

@ -738,7 +738,7 @@ def htmlTimeline(cssCache: {}, defaultTimeline: str,
# show the posts
itemCtr = 0
if timelineJson:
if not timelineJson.get('orderedItems'):
if 'orderedItems' not in timelineJson:
print('ERROR: no orderedItems in timeline for '
+ boxName + ' ' + str(timelineJson))
return ''