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"),