Skip to content

Commit

Permalink
Fix some issues in Post class and spamhandling calls to Post properti…
Browse files Browse the repository at this point in the history
…es. --autopull
  • Loading branch information
teward committed Mar 25, 2017
1 parent 87a2afa commit 619decf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion classes/Post.py
Expand Up @@ -194,7 +194,7 @@ def post_site(self):

@property
def post_url(self):
return unicode(self._post_url)
return unicode(self._post_site)

@property
def title(self):
Expand Down
4 changes: 2 additions & 2 deletions spamhandling.py
Expand Up @@ -86,8 +86,8 @@ def handle_spam(post, reasons, why):
datahandling.add_auto_ignored_post((post.post_id, post.post_site, datetime.now()))
if why is not None and why != "":
datahandling.add_why(post.post_site, post.post_id, why)
if post.is_answer and post.question_id is not None:
datahandling.add_post_site_id_link((post.post_id, post.post_site, "answer"), post.question_id)
if post.is_answer and post.post_id is not None and post.post_id is not "":
datahandling.add_post_site_id_link((post.post_id, post.post_site, "answer"), post.post_id)
try:
post.title = parsing.escape_special_chars_in_title(post.title)
sanitized_title = regex.sub('(https?://|\n)', '', post.title)
Expand Down

0 comments on commit 619decf

Please sign in to comment.