forked from indymedia/epicyon
Object
parent
51585a1542
commit
7603b85ff7
|
@ -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')
|
||||
|
|
Loading…
Reference in New Issue