Skip to content

Commit

Permalink
Merge pull request #3 from joechong88/patch-1
Browse files Browse the repository at this point in the history
Update the re.search to use string
  • Loading branch information
rjurney committed Dec 31, 2013
2 parents d32c5fb + aa6689f commit 28c4552
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ch03/web/index.py
Expand Up @@ -16,7 +16,7 @@ def sent_counts():
sent_counts = db['sent_counts'].find()
results = {}
results['keys'] = 'from', 'to', 'total'
results['values'] = [[s['from'], s['to'], s['total']] for s in sent_counts if re.search('apache', s['from']) or re.search('apache', s['to'])]
results['values'] = [[s['from'], s['to'], s['total']] for s in sent_counts if re.search('apache', str(s['from'])) or re.search('apache', str(s['to']))]
results['values'] = results['values'][0:17]
return render_template('table.html', results=results)

Expand Down

0 comments on commit 28c4552

Please sign in to comment.