From 9bcf7574bfa16467826bdfdb22b98bd7f1b533fa Mon Sep 17 00:00:00 2001 From: Roberto Rosario Date: Wed, 11 Apr 2012 03:33:23 -0400 Subject: [PATCH] Remove reduntant code from the object_list object default column detection code --- apps/common/templates/generic_list_subtemplate.html | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/apps/common/templates/generic_list_subtemplate.html b/apps/common/templates/generic_list_subtemplate.html index 15732c8998..1e0868a227 100644 --- a/apps/common/templates/generic_list_subtemplate.html +++ b/apps/common/templates/generic_list_subtemplate.html @@ -77,11 +77,13 @@ {{ column.name|capfirst }} {% endfor %} - {% get_object_list_object_name object_list.0 %} + {% if object_list %} + {% get_object_list_object_name object_list.0 %} - {% for column in object|get_model_list_columns %} - {{ column.name|capfirst }} - {% endfor %} + {% for column in object|get_model_list_columns %} + {{ column.name|capfirst }} + {% endfor %} + {% endif %} {% for column in extra_columns %} {{ column.name|capfirst }}