Skip to content

400 error for empty reject text

Summary

When adding only a whitespace or newline to a comment (both the "for students" and "for TAs" field contain this bug), the field is not considered empty. Attempting to reject the request now leads to a 400 error rather than a useful message.

Steps to reproduce

  1. Click 'reject' on a request
  2. Enter only whitespaces/newlines in one or both of the comment fields
  3. Get redirected to /request/request/reject to observe an error 400

Possible Fix

Check the field for actual text rather than it being completely empty.