mirror of
https://gitlab.com/bashrc2/epicyon
synced 2026-11-02 18:59:53 +00:00
Object
This commit is contained in:
1 parent
51585a1542
commit
7603b85ff7
1 file changed
+2
-2
+2
-2
@@ -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')
|
||||
|
||||
Reference in new issue
Block a user