Less indentation

merge-requests/30/head
Bob Mottram 2024-08-04 20:13:29 +01:00
parent 6d0572c675
commit 52ea6b3a7e
1 changed files with 10 additions and 8 deletions

View File

@ -3562,14 +3562,16 @@ def undo_announce_collection_entry(recent_posts_cache: {},
total_items = post_json_object['object']['shares']['totalItems'] total_items = post_json_object['object']['shares']['totalItems']
item_found = False item_found = False
for announce_item in post_json_object['object']['shares']['items']: for announce_item in post_json_object['object']['shares']['items']:
if announce_item.get('actor'): if not announce_item.get('actor'):
if announce_item['actor'] == actor: continue
if debug: if announce_item['actor'] != actor:
print('DEBUG: Announce was removed for ' + actor) continue
an_it = announce_item if debug:
post_json_object['object']['shares']['items'].remove(an_it) print('DEBUG: Announce was removed for ' + actor)
item_found = True an_it = announce_item
break post_json_object['object']['shares']['items'].remove(an_it)
item_found = True
break
if not item_found: if not item_found:
return return
if total_items == 1: if total_items == 1: