Sort group member listing by WatIAM ID #78

Merged
r389li merged 4 commits from :master into master 2022-10-13 14:58:51 -04:00
Member

Closes #74.

Closes #74.
j23leung self-assigned this 2022-10-12 02:41:11 -04:00
j23leung added 1 commit 2022-10-12 02:41:13 -04:00
j23leung added 1 commit 2022-10-12 02:41:24 -04:00
r389li requested changes 2022-10-12 12:58:12 -04:00
@ -64,6 +64,7 @@ class Group:
# to_dict() is usually called for display purposes, so get some more
# information to display
data['members'] = self.ldap_srv.get_display_info_for_users(self.members)
data['members'].sort(key=lambda member: member['uid'])
Owner

Let's sort higher up (in get_display_info_for_users), I think that can be helpful in case we reuse that function for it to be consistent.

Let's sort higher up (in `get_display_info_for_users`), I think that can be helpful in case we reuse that function for it to be consistent.
j23leung marked this conversation as resolved
j23leung added 1 commit 2022-10-12 18:15:07 -04:00
j23leung requested review from r389li 2022-10-12 18:18:14 -04:00
j23leung was unassigned by r389li 2022-10-13 00:17:45 -04:00
r389li requested changes 2022-10-13 00:19:22 -04:00
r389li left a comment
Owner

Almost there!

Almost there!
@ -113,3 +113,3 @@
attributes = ['uid', 'cn', 'program']
conn.search(self.ldap_users_base, filter, attributes=attributes)
return [
entries = [
Owner

Can we use sorted to make the code cleaner and avoid an explicit .sort() call and extra variable?

Can we use `sorted` to make the code cleaner and avoid an explicit `.sort()` call and extra variable?
j23leung marked this conversation as resolved
j23leung added 1 commit 2022-10-13 00:23:27 -04:00
j23leung requested review from r389li 2022-10-13 01:30:02 -04:00
r389li approved these changes 2022-10-13 01:31:56 -04:00
r389li left a comment
Owner

Perfect, LGTM :)

Perfect, LGTM :)
j23leung scheduled this pull request to auto merge when all checks succeed 2022-10-13 01:46:37 -04:00
r389li merged commit c30ca54752 into master 2022-10-13 14:58:51 -04:00
Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: public/pyceo#78
No description provided.