Indentation

main
Bob Mottram 2019-11-18 16:03:54 +00:00
parent 88861ad69d
commit d8eb8ad375
1 changed files with 13 additions and 13 deletions

View File

@ -65,8 +65,8 @@ def undoBookmarksCollectionEntry(baseDir: str,postFilename: str,objectUrl: str,
if bookmarkItem['actor']==actor:
if debug:
print('DEBUG: bookmark was removed for '+actor)
postJsonObject['object']['bookmarks']['items'].remove(bookmarkItem)
itemFound=True
postJsonObject['object']['bookmarks']['items'].remove(bookmarkItem)
itemFound=True
break
if not itemFound:
@ -153,17 +153,17 @@ def updateBookmarksCollection(baseDir: str,postFilename: str, \
if not postJsonObject['object'].get('bookmarks'):
if debug:
print('DEBUG: Adding initial bookmarks to '+objectUrl)
bookmarksJson = {
"@context": "https://www.w3.org/ns/activitystreams",
'id': objectUrl,
'type': 'Collection',
"totalItems": 1,
'items': [{
'type': 'Bookmark',
'actor': actor
}]
}
postJsonObject['object']['bookmarks']=bookmarksJson
bookmarksJson = {
"@context": "https://www.w3.org/ns/activitystreams",
'id': objectUrl,
'type': 'Collection',
"totalItems": 1,
'items': [{
'type': 'Bookmark',
'actor': actor
}]
}
postJsonObject['object']['bookmarks']=bookmarksJson
else:
if not postJsonObject['object']['bookmarks'].get('items'):
postJsonObject['object']['bookmarks']['items']=[]