diff --git a/backend/src/upload.py b/backend/src/upload.py index d01b862..cba2c4a 100644 --- a/backend/src/upload.py +++ b/backend/src/upload.py @@ -222,8 +222,8 @@ def load_cohort_dict_file(dict_path: str, cohort_id: str, user_email: str) -> Da errors = [] for i, row in df.iterrows(): # Check if required columns are present - if not row["VARIABLE NAME"] or not row["VARIABLE LABEL"] or not row["VAR TYPE"] or not row["count"]: - errors.append(f"Row {i+2} is missing required data: VARIABLE NAME, VARIABLE LABEL, VAR TYPE, or count") + if not row["VARIABLE NAME"] or not row["VARIABLE LABEL"] or not row["VAR TYPE"] or not row["COUNT"]: + errors.append(f"Row {i+2} is missing required data: VARIABLE NAME, VARIABLE LABEL, VAR TYPE, or COUNT") if row["VAR TYPE"] not in ACCEPTED_DATATYPES: errors.append( f"Row {i+2} for variable `{row['VARIABLE NAME']}` is using a wrong datatype: `{row['VAR TYPE']}`. It should be one of: {', '.join(ACCEPTED_DATATYPES)}"