Made the widget a bit more resistent to missing entries, i.e. vocabularies or in other way indexes. The problem occur if an option is deleted from the registry but not deleted from the collections in before hand.

This commit is contained in:
Bo Simonsen 2012-12-10 15:06:34 +01:00
parent d16c2ce505
commit ccd7cd0abf
1 changed files with 2 additions and 1 deletions

View File

@ -14,7 +14,8 @@
<tal:counter tal:define="dummy python:request.set('querystringwidgetcounter', 0)"/>
<tal:row repeat="row rows">
<div class="criteria"
tal:condition="python:not request.has_key('removecriteria.%s' % repeat['row'].index)">
tal:condition="python:not request.has_key('removecriteria.%s' % repeat['row'].index) and
row.i in indexes">
<div class="queryindex">
<input type="hidden" name="form.widgets.query.i:records"
tal:attributes="name python:str(fieldName)+'.i:records'; value row/i" />