Fix an error in get_user_document

Re @bendemboski's [comment](https://github.com/ncortot/mongoengine/commit/c17f94422fd6ac388dbdf1bc60139525bfcbd018#commitcomment-3773452).