-
Notifications
You must be signed in to change notification settings - Fork 0
FIX: proper handling of group memberships #8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: group-dm-user-addition-pre
Are you sure you want to change the base?
Conversation
|
cursor review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| controller.set('model', model); | ||
| controller.set('members', this.get('_members')); | ||
| controller.set("model", model); | ||
| model.findMembers(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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