mirror of
https://codeberg.org/rimu/pyfedi
synced 2025-01-23 19:36:56 -08:00
sometimes ap_id is a dict?!
This commit is contained in:
parent
6a9ba43936
commit
6cc6fceb5b
1 changed files with 2 additions and 0 deletions
|
@ -1629,6 +1629,8 @@ def process_upvote(user, store_ap_json, request_json, announced=True):
|
|||
def process_downvote(user, store_ap_json, request_json, announced=True):
|
||||
id = request_json['id']
|
||||
ap_id = request_json['object'] if not announced else request_json['object']['object']
|
||||
if isinstance(ap_id, dict) and 'id' in ap_id:
|
||||
ap_id = ap_id['id']
|
||||
liked = find_liked_object(ap_id)
|
||||
if liked is None:
|
||||
log_incoming_ap(id, APLOG_DISLIKE, APLOG_FAILURE, request_json if store_ap_json else None, 'Unfound object ' + ap_id)
|
||||
|
|
Loading…
Add table
Reference in a new issue