master
Bob Mottram 2019-09-03 14:05:19 +01:00
parent 51585a1542
commit 7603b85ff7
1 changed files with 2 additions and 2 deletions

View File

@ -102,7 +102,7 @@ def undoAnnounceCollectionEntry(postFilename: str,actor: str,debug: bool) -> Non
print('DEBUG: shares (announcements) was removed from post')
del postJsonObject['object']['shares']
else:
postJsonObject['object']['shares']['totalItems']=len(postJsonObject['shares']['items'])
postJsonObject['object']['shares']['totalItems']=len(postJsonObject['object']['shares']['items'])
with open(postFilename, 'w') as fp:
commentjson.dump(postJsonObject, fp, indent=4, sort_keys=True)
@ -146,7 +146,7 @@ def updateAnnounceCollection(postFilename: str,actor: str,debug: bool) -> None:
'actor': actor
}
postJsonObject['object']['shares']['items'].append(newAnnounce)
postJsonObject['object']['shares']['totalItems']=len(postJsonObject['shares']['items'])
postJsonObject['object']['shares']['totalItems']=len(postJsonObject['object']['shares']['items'])
else:
if debug:
print('DEBUG: shares (announcements) section of post has no items list')