Closed kristijanhusak closed 8 years ago
That looks fine to me.
More generally though, do you think that getUserGroup
, setUserGroup
and clearUserGroup
should throw an error if the user doesn't exist?
I think only writable methods should throw error, so setUserGroup
and clearUserGroup
. getUserGroup
is just a getter.
Oh right, of course. Sounds good and I will update this accordingly.
Any idea when this fix will make it into a release? I'm having issues with blank users being created also.
Yes, thanks for the ping! Just released 0.5.9 with this merged.
Btw @kristijanhusak, would you mind if I added you as a collaborator on this repo (and publish access for Meteor) so you can merge in your nice features on your branch?
This fixes the issue with inserting empty data into the collections.
I have situation where i need to delete a user. This is the code i'm running on server to achieve that:
Partitioner properly removes entry from
ts.grouping
collection, butremoved
"hook" is triggered afterwards, probably several times, and inserts the user back to the table with the_id
field only. I also tried doing something like this, but it didn't help:This should fix the problem because update will only work if entry exists in the collection.