Skip to content

Commit

Permalink
Simplify even more
Browse files Browse the repository at this point in the history
  • Loading branch information
csnardi committed Feb 22, 2015
1 parent 27c99d1 commit 74fc182
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion findspam.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def test_post(title, body, user_name, site, is_answer, body_is_summary):
result.append(rule['reason'])
except KeyError: # There is no special logic for this rule
result.append(rule['reason'].replace("{}", "username"))
if matched_body and rule['body'] and (False if (body_is_summary and not rule['body_summary']) else True):
if matched_body and rule['body'] and (not body_is_summary or rule['body_summary']):
type_of_post = "answer" if is_answer else "body"
try:
if getattr(FindSpam, "%s" % rule['validation_method'])(matched_body):
Expand Down

0 comments on commit 74fc182

Please sign in to comment.