Fix a couple bugs when editing users.
Review Request #7847 — Created Jan. 7, 2016 and submitted
This fixes two issues when editing users:
- Saving a user without a primary mentor was failing due to a bad cast between
the empty string andObjectId
. I've fixed it so that the frontend will
serialize an empty primary mentor tonull
instead.
- An empty groups field contained an empty<span class="label">
element,
which was making it impossible to click to trigger the editor. I've added a
check so that the element is truly empty, which x-editable will show as an
italic "Empty", making it clickable.
Used both of these to set up our latest student.