diff --git a/opentech/apply/activity/templatetags/activity_tags.py b/opentech/apply/activity/templatetags/activity_tags.py index 649e48387139fa0025722a3e690ebac4d6eb18bc..20a64b679b687d19797fc43825b291c066ac2504 100644 --- a/opentech/apply/activity/templatetags/activity_tags.py +++ b/opentech/apply/activity/templatetags/activity_tags.py @@ -38,6 +38,10 @@ def display_for(activity, user): message_data = json.loads(activity.message) except json.JSONDecodeError: return activity.message + else: + # A message with only numbers (int) is valid json so check we have "real" json. + if not isinstance(message_data, (dict, list)): + return activity.message visibile_for_user = activity.visibility_for(user)