def send_import_mail(task, result):
 ij = ImportJob.query.filter_by(task=task).first()
 if (not ij):
  return
 send_email_after_import(email=ij.user.email, result=result)

def send_import_mail ( task , result ) : ij = ImportJob . query . filter_by ( task = task ) . first ( ) if ( not ij ) : return send_email_after_import ( email = ij . user . email , result = result )
send email after import .