Ticket #3434: patch_admin_for_empty_models.patch
File patch_admin_for_empty_models.patch, 922 bytes (added by , 18 years ago) |
---|
-
django/contrib/admin/views/main.py
193 193 field_sets = opts.admin.get_field_sets(opts) 194 194 original = getattr(manipulator, 'original_object', None) 195 195 bound_field_sets = [field_set.bind(context['form'], original, AdminBoundFieldSet) for field_set in field_sets] 196 first_form_field_id = bound_field_sets[0].bound_field_lines[0].bound_fields[0].form_fields[0].get_id(); 196 try: 197 first_form_field_id = bound_field_sets[0].bound_field_lines[0].bound_fields[0].form_fields[0].get_id(); 198 except IndexError: 199 first_form_field_id = None 197 200 ordered_objects = opts.get_ordered_objects() 198 201 inline_related_objects = opts.get_followed_related_objects(manipulator.follow) 199 202 extra_context = {