• 
      

    Fix a couple bugs when editing users.

    Review Request #7847 — Created Jan. 7, 2016 and submitted

    Information

    student-sonar
    master
    a07928e...

    Reviewers

    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 and ObjectId. I've fixed it so that the frontend will
    serialize an empty primary mentor to null 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.

    reviewbot
    1. Tool: PEP8 Style Checker
      Ignored Files:
          lib/frontend/user-detail-view.js
          lib/frontend/models.js
      
      
      
      Tool: Pyflakes
      Ignored Files:
          lib/frontend/user-detail-view.js
          lib/frontend/models.js
      
      
    2. 
        
    mike_conley
    1. Ship It!
    2. 
        
    david
    Review request changed
    Status:
    Completed
    Change Summary:
    Pushed to master (22fc1f4)