From 5c5256cae99299040ad1c0e077f288e172d40e9a Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sun, 30 Apr 2023 18:46:24 +0100 Subject: [PATCH] Check for dictionary --- posts.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/posts.py b/posts.py index 89150e3bb..ecf31235b 100644 --- a/posts.py +++ b/posts.py @@ -6144,6 +6144,10 @@ def edited_post_filename(base_dir: str, nickname: str, domain: str, return '', None if lastpost_json['type'] != post_json_object['type']: return '', None + if lastpost_json.get('object'): + return '', None + if not isinstance(lastpost_json['object'], dict): + return '', None if not lastpost_json['object'].get('type'): return '', None if lastpost_json['object']['type'] != post_json_object['object']['type']: