Ticket #679: collapse-fix.diff

File collapse-fix.diff, 1.0 KB (added by malcolm@…, 19 years ago)

Fix for the described problem

  • main.py

     
    556556        if not seen_collapse and 'collapse' in options.get('classes', ''):
    557557            seen_collapse = True
    558558            javascript_imports.append('%sjs/admin/CollapsedFieldsets.js' % ADMIN_MEDIA_PREFIX)
    559         try:
    560             for field_list in options['fields']:
     559        for field_list in options['fields']:
     560            try:
    561561                for f in field_list:
    562562                    if f.rel and isinstance(f, meta.ManyToManyField) and f.rel.filter_interface:
    563563                        javascript_imports.extend(['%sjs/SelectBox.js' % ADMIN_MEDIA_PREFIX, '%sjs/SelectFilter2.js' % ADMIN_MEDIA_PREFIX])
    564564                        raise StopIteration
    565         except StopIteration:
    566             break
     565            except StopIteration:
     566                break
    567567    for j in javascript_imports:
    568568        t.append('<script type="text/javascript" src="%s"></script>' % j)
    569569
Back to Top