Skip to content

Commit

Permalink
Merge pull request #1978 from josenavas/misc-issues
Browse files Browse the repository at this point in the history
Checking for None
  • Loading branch information
antgonza committed Oct 27, 2016
2 parents 33ff464 + 7386f44 commit 764f074
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions qiita_pet/handlers/api_proxy/prep_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,13 @@ def prep_template_ajax_get_req(user_id, prep_id):
redis_info = loads(r_client.get(job_id))
processing = redis_info['status_msg'] == 'Running'
success = redis_info['status_msg'] == 'Success'
alert_type = redis_info['return']['status']
alert_msg = redis_info['return']['message'].replace(
'\n', '</br>')
if redis_info['return'] is not None:
alert_type = redis_info['return']['status']
alert_msg = redis_info['return']['message'].replace(
'\n', '</br>')
else:
alert_type = 'info'
alert_msg = ''

if processing:
alert_type = 'info'
Expand Down

0 comments on commit 764f074

Please sign in to comment.