Skip to content
Snippets Groups Projects
Unverified Commit 09950dbc authored by Fredrik Jonsson's avatar Fredrik Jonsson Committed by GitHub
Browse files

Merge pull request #1785 from OpenTechFund/fix/comment_only_int_not_json

A message with only numbers (int) is valid json so check we have "rea…
parents 8304d1d8 6dafeb9e
No related branches found
No related tags found
No related merge requests found
......@@ -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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment