Skip to content

Commit

Permalink
fix count
Browse files Browse the repository at this point in the history
  • Loading branch information
vemonet committed Apr 4, 2024
1 parent acfe93b commit 531cf54
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions backend/src/upload.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)}"
Expand Down

0 comments on commit 531cf54

Please sign in to comment.