title: Update MongoDB ReferenceField using Flask-Admin
body: <p>I'm trying to create an admin page from which I can edit what roles a user is member of using MonogDB and Flask-Admin.</p>
  
  <p><strong>models.py</strong>
  </p>
  
  <pre class="lang-py prettyprint-override"><code>class Role(db.Document, RoleMixin):
      name = db.StringField(max_length=80, unique=True)
      description = db.StringField(max_length=255)
  
      def __unicode__(self):
          return self.name
  
  class User(db.Document, UserMixin):
      email = db.StringField(max_length=255)
      password = db.StringField(max_length=255)
      roles = db.ListField(db.ReferenceField(Role))
  </code></pre>
  
  <p><strong>admin.py</strong>
  </p>
  
  <pre class="lang-py prettyprint-override"><code>class UserView(ModelView):
      from wtforms.fields import SelectMultipleField
      from bson import ObjectId, DBRef
      form_overrides = dict(roles=SelectMultipleField)
      options = [(g.id, g.name) for g in models.Role.objects()]
      # print options
      # [(ObjectId('54a72849426c702850d01921'), u'community'),
      #  (ObjectId('54a72849426c702850d01922'), u'customer')]
      form_args = dict(roles=dict(choices=options))
  </code></pre>
  
  <p>When I select a user role in the Flask-Admin edit_form view and cilck save, following form validation error is shown: <strong>'54a72849426c702850d01922' is not a valid choice for this field</strong></p>
  
  <p>What's the correct way to edit/update a ReferenceField ?</p>