Browse Source

Handle pre-existing bad data for Mongo errors

David Cramer 8 years ago
parent
commit
683e0489fa
1 changed files with 6 additions and 0 deletions
  1. 6 0
      src/sentry/api/serializers/models/group.py

+ 6 - 0
src/sentry/api/serializers/models/group.py

@@ -118,6 +118,12 @@ class GroupSerializer(Serializer):
         metadata = obj.data.get('metadata') or {
             'title': obj.message_short,
         }
+        # TODO(dcramer): remove in 8.6+
+        if event_type == 'error':
+            if 'value' in metadata:
+                metadata['value'] = unicode(metadata['value'])
+            if 'type' in metadata:
+                metadata['type'] = unicode(metadata['type'])
 
         return {
             'id': str(obj.id),