Skip to content

Commit

Permalink
don't return attachments in the response after posting
Browse files Browse the repository at this point in the history
  • Loading branch information
davisagli committed Dec 5, 2024
1 parent 5a413ae commit 3bfd962
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,10 @@ def reply(self):
self.request.response.setStatus(500)
return {"type": "InternalServerError", "message": message}

return {"data": self.form_data}
data_without_attachments = {
k: v for k, v in self.form_data.items() if type(v) is not dict
}
return {"data": data_without_attachments}

def cleanup_data(self):
"""Ignore fields not defined in form schema"""
Expand Down

0 comments on commit 3bfd962

Please sign in to comment.