(params, index, cb)
| 605 | } |
| 606 | |
| 607 | var iterator = function (params, index, cb) { |
| 608 | createInstance(params, { |
| 609 | is_new : true, |
| 610 | autoSave : opts.autoSave, |
| 611 | autoFetch : false |
| 612 | }, function (err, item) { |
| 613 | if (err) { |
| 614 | err.index = index; |
| 615 | err.instance = item; |
| 616 | |
| 617 | return cb(err); |
| 618 | } |
| 619 | item.save({}, options, function (err) { |
| 620 | if (err) { |
| 621 | err.index = index; |
| 622 | err.instance = item; |
| 623 | |
| 624 | return cb(err); |
| 625 | } |
| 626 | |
| 627 | items[index] = item; |
| 628 | cb(); |
| 629 | }); |
| 630 | }); |
| 631 | }; |
| 632 | |
| 633 | async.eachOfSeries(itemsParams, iterator, function (err) { |
| 634 | if (err) return done(err); |
nothing calls this directly
no test coverage detected