MongoEngine/mongoengine — pull request #713 by starsirius (2014-07-27 23:07:09+00:00)
Title: Allow pre_save_post_validation signal to modify document.

It makes sense to me that the `pre_save_post_validation` signal allows modifying the document after validation and before save (maybe doing some normalization).

Currently the `pre_save_post_validation` signal is passed in the document object, but the `doc` reference used afterwards is actually from before, so the modification of the document in the signal won't persist anywhere. This PR simply converts the document to mongo after the `pre_save_post_validation` signal.

Please let me know if this makes sense and I will try to add a test for it. The signal tests seem to not catch this kind behavior. Thanks!