File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -215,7 +215,7 @@ def is_django_staff(self):
215215 def get_admin_note (note_type = 'admin_note' ):
216216 """Return a note on the account."""
217217 note = model .database .person_get_admin_note (note_type )
218- return None if note == "None" else note
218+ return None if ( note == "None" or note == "" ) else note
219219
220220 def set_admin_note (note , note_type = 'admin_note' ):
221221 """Set a note on the account."""
Original file line number Diff line number Diff line change @@ -98,8 +98,13 @@ def no_login_name(user, dummy):
9898 login_name = model .database .person_get_login_name (user )
9999 return login_name is None or login_name == ""
100100
101+ def admin_note_match (user , pattern ):
102+ note = user .get_admin_note ()
103+ return note and re .search (pattern , note )
104+
101105user_list_filters = {
102- 'name' : name_match ,
106+ 'name_matching' : name_match ,
107+ 'admin_note_matching' : admin_note_match ,
103108 'date_joined_before' : joined_before ,
104109 'date_joined_after' : joined_after ,
105110 'no_email' : no_email ,
You can’t perform that action at this time.
0 commit comments