fix typo and doctest after JSON fix

This commit is contained in:
Helmut Merz 2019-12-06 07:56:30 +01:00
parent b59248ee31
commit c3079472de
2 changed files with 2 additions and 2 deletions

View file

@ -209,7 +209,7 @@ class Search(ConceptView):
data.sort(key=lambda x: x['sort']) data.sort(key=lambda x: x['sort'])
if not title: if not title:
data.insert(0, {'label': '', 'name': '', 'id': ''}) data.insert(0, {'label': '', 'name': '', 'id': ''})
jsonData = dict(itentifier='id') jsonData = dict(identifier='id')
jsonItems = [] jsonItems = []
for item in data[:100]: for item in data[:100]:
jsonItems.append(dict(label=item['label'], jsonItems.append(dict(label=item['label'],

View file

@ -177,7 +177,7 @@ of the concepts' titles:
>>> request = TestRequest(form=form) >>> request = TestRequest(form=form)
>>> view = Search(page, request) >>> view = Search(page, request)
>>> view.listConcepts() >>> view.listConcepts()
u"{identifier: 'id', items: [{label: 'Zope (Thema)', name: 'Zope', id: '101'}, {label: 'Zope 2 (Thema)', name: 'Zope 2', id: '103'}, {label: 'Zope 3 (Thema)', name: 'Zope 3', id: '105'}]}" '{"items": [{"id": "101", "name": "Zope", "label": "Zope (Thema)"}, {"id": "103", "name": "Zope 2", "label": "Zope 2 (Thema)"}, {"id": "105", "name": "Zope 3", "label": "Zope 3 (Thema)"}], "identifier": "id"}'
Preset Concept Types on Search Forms Preset Concept Types on Search Forms
------------------------------------ ------------------------------------