From 9278711b38e4ef4aea5fa49c03b108e6e520555f Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Fri, 7 Jul 2023 09:30:32 +0100 Subject: [PATCH] Change condition order --- webapp_profile.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/webapp_profile.py b/webapp_profile.py index a440597a3..42623617b 100644 --- a/webapp_profile.py +++ b/webapp_profile.py @@ -108,11 +108,11 @@ def _valid_profile_preview_post(post_json_object: {}, if not isinstance(post_json_object, dict): return False, None is_announced_feed_item = False + if not post_json_object.get('type'): + return False, None if is_create_inside_announce(post_json_object): is_announced_feed_item = True post_json_object = post_json_object['object'] - if not post_json_object.get('type'): - return False, None if post_json_object['type'] == 'Create': if not has_object_dict(post_json_object): return False, None