From 96ef75a75dace8b7ed125bfac0f6cf8367decaec Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Wed, 7 Dec 2016 20:36:54 -0600 Subject: [PATCH] Hopefully fix some bugs with people view(s) --- tailbone/views/people.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/tailbone/views/people.py b/tailbone/views/people.py index 4ef4f999..472afc30 100644 --- a/tailbone/views/people.py +++ b/tailbone/views/people.py @@ -83,11 +83,11 @@ class PeopleView(MasterView): g.sorters['email'] = lambda q, d: q.order_by(getattr(model.PersonEmailAddress.address, d)()) g.sorters['phone'] = lambda q, d: q.order_by(getattr(model.PersonPhoneNumber.number, d)()) - g.default_sortkey = 'display_name' + g.default_sortkey = 'full_name' g.configure( include=[ - g.display_name.label("Full Name"), + g.full_name, g.first_name, g.last_name, g.phone.label("Phone Number"), @@ -108,7 +108,6 @@ class PeopleView(MasterView): raise HTTPNotFound def _preconfigure_fieldset(self, fs): - fs.display_name.set(label="Full Name") fs.phone.set(label="Phone Number", readonly=True) fs.email.set(label="Email Address", readonly=True) fs.address.set(label="Mailing Address", readonly=True) @@ -117,7 +116,7 @@ class PeopleView(MasterView): def configure_fieldset(self, fs): fs.configure( include=[ - fs.display_name, + fs.full_name, fs.first_name, fs.middle_name, fs.last_name, @@ -131,7 +130,7 @@ class PeopleView(MasterView): class PeopleAutocomplete(AutocompleteView): mapped_class = model.Person - fieldname = 'display_name' + fieldname = 'full_name' class PeopleEmployeesAutocomplete(PeopleAutocomplete):