Skip to content

Commit

Permalink
issues with nones on ftp_user
Browse files Browse the repository at this point in the history
  • Loading branch information
jorgeboucas committed Feb 6, 2024
1 parent 342c47e commit 5b644c0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
2 changes: 1 addition & 1 deletion routes/apps/_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,7 @@ def send_submission_ftp_email(user,submission_type,submission_tag, submission_fi

today=str(date.today())

if ftp_user == "" :
if ( ftp_user == "" ) or ( not ftp_user) :

ftp_user=user_generator()
ftp_pass=password_generator()
Expand Down
13 changes: 5 additions & 8 deletions routes/apps/crispr.py
Original file line number Diff line number Diff line change
Expand Up @@ -1411,15 +1411,12 @@ def writeout(subdic=subdic, json_config=json_config, json_filename=json_filename
ftp_user=send_submission_ftp_email(user=current_user, submission_type="crispr", submission_tag=json_filename, submission_file=json_filename, attachment_path=json_filename, ftp_user=ftp)
arguments=pd.concat([arguments,ftp_user])
ftp_user=ftp_user["Value"].tolist()[0]
raw_folder=json_config[os.path.basename(json_filename)]["raven"]["raw_fastq"]
raw_folder=json_config[json_filename_]["raven"]["raw_fastq"]
raw_folder=os.path.join( raw_folder, ftp_user )
json_config[os.path.basename(json_filename)]["raven"]["ftp"]=ftp_user
json_config[os.path.basename(json_filename)]["studio"]["ftp"]=ftp_user


## keep on from here
json_config[os.path.basename(json_filename)]["raven"]["raw_fastq"]=raw_folder
json_config[os.path.basename(json_filename)]["studio"]["raw_fastq"]=raw_folder
json_config[json_filename_]["raven"]["ftp"]=ftp_user
json_config[json_filename_]["studio"]["ftp"]=ftp_user
json_config[json_filename_]["raven"]["raw_fastq"]=raw_folder
json_config[json_filename_]["studio"]["raw_fastq"]=raw_folder

if BAGEL_NONESSENTIAL != "/bagel/NEGv1.txt" :
json_config[os.path.basename(json_filename)]["raven"]["bagel_nonessential"]=os.path.join(raw_folder,BAGEL_NONESSENTIAL)
Expand Down

0 comments on commit 5b644c0

Please sign in to comment.