rschmukler/agenda — pull request #51 by inetfuture (2014-04-09 08:30:25+00:00)
Title: fix $setOnInsert with empty obj cause mongodb 2.6 complain

With the new mongodb 2.6, `$setOnInsert` with empty object will cause this error:

```
findAndModifyFailed failed: {
"errmsg" : "exception: '$setOnInsert' is empty. You must specify a field like so: {$mod: {: ...}}",
"code" : 9,
"ok" : 0
}
```

So I use it only when its content is not empty.