Transformapp/webapp — pull request #25 by kevint2u (2014-07-26 16:25:20+00:00)
Title: Group details bug fix (displaying duplicate users/admins)

Moved setUsers/setAdmins functions into toObject function. I had a bug where I was getting duplicate admins/users displaying in the group details page.... because the setAdmins/setUsers functions only append objects to the existing arrays that contain users/admins, they don't overwrite the arrays. Because the toObject function is called, and then setAdmins/setUsers is called again when you load the group, the result is that duplicate users/admins are added to the group that is returned.

I tried several implementations, but I felt this one made the most sense, @keviekev23 correct me if I'm wrong. I made a couple previous commits on this branch if you wanna look at them, doing the same thing in different ways (clearing the arrays before setting in loadGroup OR removing the logic for setting users/admins from the toObject function altogether and leaving it in loadGroup). Let me know what your thoughts on how to best fix this problem are