Skip to content

Commit cf50ea3

Browse files
MDE/PKFE-16 final bug fixes
1 parent ac6b060 commit cf50ea3

File tree

2 files changed

+15
-4
lines changed

2 files changed

+15
-4
lines changed

app/back-end/src/routes/workspace_aggregate_route.py

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,14 @@ def get_workspace_aggregate_all(relative_path):
6464
if header:
6565
for row in reader:
6666
for field in columns_aggregation.keys():
67+
68+
header_index = header.index(field)
69+
if header_index >= len(row):
70+
skipped_counts[field] += 1
71+
continue
72+
6773
action = header_actions[field]
68-
value = row[header.index(field)]
74+
value = row[header_index]
6975
if action == "cnt":
7076
if value:
7177
header_values[field] += float(1)
@@ -252,9 +258,14 @@ def get_workspace_aggregate(relative_path):
252258
),
253259
404,
254260
)
255-
261+
256262
for row in reader:
257-
value = row[header.index(field)]
263+
header_index = header.index(field)
264+
if header_index >= len(row):
265+
skipped_count += 1
266+
continue
267+
268+
value = row[header_index]
258269
if action == "cnt":
259270
if value:
260271
result += float(1)

app/front-end/src/features/editor/components/editorView/editorView.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ export const EditorView: React.FC = () => {
115115

116116
const getWorkspaceFile = useCallback(async () => {
117117
if (!file.id) {
118-
fileStateReset();
118+
setFileContentResponse({ totalRows: 0, header: [], rows: [], page: 0 });
119119
return;
120120
}
121121

0 commit comments

Comments
 (0)