micktaiwan/meteor-vermongo

Versions are created for unsuccessful updates

Closed this issue · 1 comments

If the collection2/simpleschema validations don't succeed, there are edge cases where update fails but copyDoc(doc) goes through with creating a version.

I think the insert happening on a server only method might be the culprit, I'm not sure. Furthermore, I've witnessed this situation with the users collection. This may or may not also be related to presence of ignored fields.

This needs to be further tested, however, a safeguard would be to convert copyDoc to a Meteor.method which automatically generates client stubs, so would be less likely to cause race conditions where client and server validation results differ.

I'm not sure I understand. Could you reproduce the issue in a sample project ?