Commits

Donald Stufft committed 47fbfad

Don't blow up if self.form is a FileUpload

  • Participants
  • Parent commits 3ffc13a

Comments (0)

Files changed (1)

                 # attempt to send all the exceptions to Raven
                 try:
                     if self.sentry_client:
+                        if self.form and not isinstance(self.form, FileUpload):
+                            form_data = self.form
+                        else:
+                            form_data = ""
+
                         self.sentry_client.captureException(
                             data={
                                 "sentry.interfaces.Http": {
                                     "query_string": self.env.get(
                                         "QUERY_STRING",
                                     ),
-                                    "data": self.form or "",
+                                    "data":form_data,
                                     "headers": dict(
                                         raven.utils.wsgi.get_headers(self.env),
                                     ),