More tweaks for python 3

This commit is contained in:
Lance Edgar 2018-02-15 12:48:14 -06:00
parent 135e98cde1
commit 5c1008a0df
7 changed files with 33 additions and 19 deletions

View file

@ -239,18 +239,18 @@ class EmployeesView(MasterView):
stores = employee.stores if employee else None
if not stores:
return ""
items = HTML.literal('')
items = []
for store in sorted(stores, key=six.text_type):
items += HTML.tag('li', c=six.text_type(store))
items.append(HTML.tag('li', c=six.text_type(store)))
return HTML.tag('ul', c=items)
def render_departments(self, employee, field):
departments = employee.departments if employee else None
if not departments:
return ""
items = HTML.literal('')
items = []
for department in sorted(departments, key=six.text_type):
items += HTML.tag('li', c=six.text_type(department))
items.append(HTML.tag('li', c=six.text_type(department)))
return HTML.tag('ul', c=items)
def get_version_child_classes(self):