Skip to content

Commit

Permalink
Adding better error handling on json object
Browse files Browse the repository at this point in the history
  • Loading branch information
simonwarchol committed Jun 28, 2023
1 parent 263d390 commit a9dedb4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions minerva_analysis/server/routes/import_routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ def save_config():
if 'celltypeData' in originalData:
celltypeName = originalData['celltypeData']
headerList = request.json['headerList']
normalizeCsv = request.json['normalizeCsv']
normalizeCsv = request.json.get('normalizeCsv')
if normalizeCsv:
print("Normalizing CSV")
skip_columns = []
Expand All @@ -365,7 +365,7 @@ def save_config():
pre_normalization.preNormalize(csvPath, normPath, skip_columns=skip_columns)
print("Finished Normalizing CSV")
elif 'normalizeCsvName' in request.json:
normCsvName = request.json['normalizeCsvName']
normCsvName = request.json.get('normalizeCsvName')
else:
normCsvName = None

Expand Down

0 comments on commit a9dedb4

Please sign in to comment.