FIX: proper handling of group memberships#8
Conversation
|
cursor review |
There was a problem hiding this comment.
Bugbot free trial expires on August 11, 2025
Learn more in the Cursor dashboard.
|
|
||
| findMembers: function() { | ||
| if (Em.isEmpty(this.get('name'))) { return Ember.RSVP.resolve([]); } | ||
| if (Em.isEmpty(this.get('name'))) { return ; } |
There was a problem hiding this comment.
Bug: findMembers() Fails on Empty Group Name
The findMembers() method now returns undefined when the group name is empty, breaking its promise contract. Previously, it returned a resolved promise (Ember.RSVP.resolve([])). This inconsistency causes "Cannot read property 'then' of undefined" errors for calling code that expects to chain .then() on the result.
Locations (1)
|
|
||
| return can_not_modify_automatic if group.automatic | ||
|
|
||
| group.users.delete(user_id) |
There was a problem hiding this comment.
| controller.set('model', model); | ||
| controller.set('members', this.get('_members')); | ||
| controller.set("model", model); | ||
| model.findMembers(); |
There was a problem hiding this comment.
Bug: Async Data Loading Issue in Routes
The setupController method in both group-members and admin_group routes calls model.findMembers() without awaiting its asynchronous completion. This causes the controller to be set up before member data is fully loaded, leading to an incorrect or incomplete initial UI state. The removed afterModel hook previously ensured this data was loaded before setupController.
Locations (2)
|
This pull request has been automatically marked as stale because it has been open for 60 days with no activity. To keep it open, remove the stale tag, push code, or add a comment. Otherwise, it will be closed in 14 days. |
Test 8