Sort group member listing by WatIAM ID #78

Merged
r389li merged 4 commits from :master into master 4 months ago
Collaborator

Closes #74.

Closes #74.
j23leung self-assigned this 4 months ago
j23leung added 1 commit 4 months ago
j23leung added 1 commit 4 months ago
r389li requested changes 4 months ago
# 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 4 months ago
j23leung requested review from r389li 4 months ago
j23leung was unassigned by r389li 4 months ago
r389li requested changes 4 months ago
r389li left a comment
Owner

Almost there!

Almost there!
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 4 months ago
j23leung requested review from r389li 4 months ago
r389li approved these changes 4 months ago
r389li left a comment
Owner

Perfect, LGTM :)

Perfect, LGTM :)
j23leung scheduled this pull request to auto merge when all checks succeed 4 months ago
r389li merged commit c30ca54752 into master 4 months ago

Reviewers

r389li approved these changes 4 months ago
The pull request has been merged as c30ca54752.
Sign in to join this conversation.
No reviewers
No Label
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date

No due date set.

Dependencies

No dependencies set.

Reference: public/pyceo#78
Loading…
There is no content yet.