Set default values for empty "priority" column in spreadsheets.

Added logic to assign a default value of 1 to empty "priority" fields in the spreadsheet service. Adjusted the router to correctly track columns explicitly marked as defaulted.
This commit is contained in:
GotthardG
2025-01-14 22:18:14 +01:00
parent c0951292d0
commit 7861082a02
2 changed files with 6 additions and 3 deletions

View File

@ -163,7 +163,8 @@ async def upload_file(file: UploadFile = File(...)):
"default_set": [
col_name
for col_name in row.get("corrected_columns", [])
if row.get("default_set", False) and col_name == "directory"
if row.get("default_set", False)
and col_name in row.get("defaulted_columns", [])
], # Specify which keys are explicitly `default_set`
}
for row in updated_raw_data