From 7603b85ff7cfb75423333adec859ebdf9bd4be97 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Tue, 3 Sep 2019 14:05:19 +0100 Subject: [PATCH] Object --- announce.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/announce.py b/announce.py index ba7acf89..5071660b 100644 --- a/announce.py +++ b/announce.py @@ -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')