:master
master
Closes #74.
# 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'])
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.
get_display_info_for_users
Almost there!
attributes = ['uid', 'cn', 'program']
conn.search(self.ldap_users_base, filter, attributes=attributes)
return [
entries = [
Can we use sorted to make the code cleaner and avoid an explicit .sort() call and extra variable?
sorted
.sort()
Perfect, LGTM :)
c30ca54752
No due date set.
No dependencies set.
Deleting a branch is permanent. It CANNOT be undone. Continue?
Closes #74.
# 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'])
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.Almost there!
attributes = ['uid', 'cn', 'program']
conn.search(self.ldap_users_base, filter, attributes=attributes)
return [
entries = [
Can we use
sorted
to make the code cleaner and avoid an explicit.sort()
call and extra variable?Perfect, LGTM :)
c30ca54752
into master 4 months agoReviewers
c30ca54752
.