Skip to content

Commit

Permalink
Boolean field can only be True or False (can't be string)
Browse files Browse the repository at this point in the history
  • Loading branch information
hsiaoyi0504 committed May 22, 2018
1 parent b71281d commit 3aac84c
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions blast/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -354,8 +354,14 @@ def save_history(post, task_id, user, seq_file):
rec.search_tag = post.get('tag')
rec.enqueue_date = datetime.now()
rec.user = user
rec.soft_masking = post.get('chk_soft_masking', False)
rec.low_complexity = post.get('chk_low_complexity', False)
if post.get('chk_soft_masking', False):
rec.soft_masking = True
else:
rec.soft_masking = False
if post.get('chk_low_complexity', False):
rec.low_complexity = True
else:
rec.low_complexity = False
rec.penalty = post.get('penalty', 0)
rec.evalue = float(post.get('evalue', 0))
rec.gapopen = post.get('gapopen', 0)
Expand Down

0 comments on commit 3aac84c

Please sign in to comment.