@@ -735,17 +735,11 @@ def __getTableSummaryWeb(
735735 return res
736736
737737 # The full list of columns in contained here
738- allRows = res ["Records " ]
738+ allRows = res ["Value " ]
739739 # Prepare the standard structure now within the resultDict dictionary
740740 resultDict = {}
741741 # Create the total records entry
742742 resultDict ["TotalRecords" ] = len (allRows )
743- # Create the ParameterNames entry
744- resultDict ["ParameterNames" ] = res ["ParameterNames" ]
745- # Find which element in the tuple contains the requested status
746- if statusColumn not in resultDict ["ParameterNames" ]:
747- return S_ERROR ("Provided status column not present" )
748- statusColumnIndex = resultDict ["ParameterNames" ].index (statusColumn )
749743
750744 # Get the rows which are within the selected window
751745 if resultDict ["TotalRecords" ] == 0 :
@@ -756,13 +750,22 @@ def __getTableSummaryWeb(
756750 return S_ERROR ("Item number out of range" )
757751 if last > resultDict ["TotalRecords" ]:
758752 last = resultDict ["TotalRecords" ]
753+
759754 selectedRows = allRows [ini :last ]
760- resultDict ["Records" ] = selectedRows
755+ resultDict ["Records" ] = []
756+ for row in selectedRows :
757+ resultDict ["Records" ].append (list (row .values ()))
758+
759+ # Create the ParameterNames entry
760+ resultDict ["ParameterNames" ] = list (selectedRows [0 ].keys ())
761+ # Find which element in the tuple contains the requested status
762+ if statusColumn not in resultDict ["ParameterNames" ]:
763+ return S_ERROR ("Provided status column not present" )
761764
762765 # Generate the status dictionary
763766 statusDict = {}
764767 for row in selectedRows :
765- status = row [statusColumnIndex ]
768+ status = row [statusColumn ]
766769 statusDict [status ] = statusDict .setdefault (status , 0 ) + 1
767770 resultDict ["Extras" ] = statusDict
768771
0 commit comments