Meteor-Community-Packages / meteor-autoform

AutoForm is a Meteor package that adds UI components and helpers to easily create basic forms with automatic insert and update events, and automatic reactive validation.
MIT License
1.44k stars 328 forks source link

Colleciton.update(some_id, {$set .... Doesn't work! #1658

Closed advancedsoftwarecanada closed 3 years ago

advancedsoftwarecanada commented 6 years ago
                        console.log(theCase);
            Cases.update(_id:theCase._id,
                {$set: {
                    caseStatus: "closed",
                    }
                }
            );
            console.log("THIS NEVER WORKS");

So, I've got a valid "Case" from my collection, but when I try to update the caseStatus... Meteor just stops. No errors, nothing. It simply never gets to console.log("THIS NEVER WORKS").

Whyyyyyy?

rikyperdana commented 6 years ago

You didn't wrap your selector in a bracket. Change to this {_id: something._id}