@@ -735,17 +735,11 @@ def __getTableSummaryWeb(
735
735
return res
736
736
737
737
# The full list of columns in contained here
738
- allRows = res ["Records " ]
738
+ allRows = res ["Value " ]
739
739
# Prepare the standard structure now within the resultDict dictionary
740
740
resultDict = {}
741
741
# Create the total records entry
742
742
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 )
749
743
750
744
# Get the rows which are within the selected window
751
745
if resultDict ["TotalRecords" ] == 0 :
@@ -756,13 +750,22 @@ def __getTableSummaryWeb(
756
750
return S_ERROR ("Item number out of range" )
757
751
if last > resultDict ["TotalRecords" ]:
758
752
last = resultDict ["TotalRecords" ]
753
+
759
754
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" )
761
764
762
765
# Generate the status dictionary
763
766
statusDict = {}
764
767
for row in selectedRows :
765
- status = row [statusColumnIndex ]
768
+ status = row [statusColumn ]
766
769
statusDict [status ] = statusDict .setdefault (status , 0 ) + 1
767
770
resultDict ["Extras" ] = statusDict
768
771
0 commit comments