From 693c2dce5710ad34b97a24a8af4676d8ce2ec379 Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Fri, 10 Mar 2017 12:45:44 -0600 Subject: [PATCH] Tweak grid configuration for Employees view --- tailbone/views/employees.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tailbone/views/employees.py b/tailbone/views/employees.py index 18005da6..3d400744 100644 --- a/tailbone/views/employees.py +++ b/tailbone/views/employees.py @@ -45,8 +45,7 @@ class EmployeesView(MasterView): """ model_class = model.Employee - def configure_grid(self, g): - + def _preconfigure_grid(self, g): g.joiners['phone'] = lambda q: q.outerjoin(model.EmployeePhoneNumber, sa.and_( model.EmployeePhoneNumber.parent_uuid == model.Employee.uuid, model.EmployeePhoneNumber.preference == 1)) @@ -89,6 +88,8 @@ class EmployeesView(MasterView): g.append(forms.AssociationProxyField('first_name')) g.append(forms.AssociationProxyField('last_name')) + def configure_grid(self, g): + g.configure( include=[ g.id.label("ID"),