Less indentation

merge-requests/30/head
Bob Mottram 2021-07-05 11:25:21 +01:00
parent cd14cc2775
commit e8d45565b4
1 changed files with 47 additions and 45 deletions

View File

@ -1977,7 +1977,8 @@ def undoAnnounceCollectionEntry(recentPostsCache: {},
shares of posts, not shares of physical objects. shares of posts, not shares of physical objects.
""" """
postJsonObject = loadJson(postFilename) postJsonObject = loadJson(postFilename)
if postJsonObject: if not postJsonObject:
return
# remove any cached version of this announce so that the announce # remove any cached version of this announce so that the announce
# icon is changed # icon is changed
nickname = getNicknameFromActor(actor) nickname = getNicknameFromActor(actor)
@ -2014,7 +2015,8 @@ def undoAnnounceCollectionEntry(recentPostsCache: {},
postJsonObject['object']['shares']['items'].remove(anIt) postJsonObject['object']['shares']['items'].remove(anIt)
itemFound = True itemFound = True
break break
if itemFound: if not itemFound:
return
if totalItems == 1: if totalItems == 1:
if debug: if debug:
print('DEBUG: shares (announcements) ' + print('DEBUG: shares (announcements) ' +