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:
@ -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
|
||||
|
Reference in New Issue
Block a user