Commit 790382db authored by Okhin's avatar Okhin
Browse files

Add_new_url now also generates a vote on article creation

parent 37e81ba1
......@@ -187,11 +187,12 @@ class Article(models.Model):
(article, created) = Article.objects.get_or_create(url=url,
# If the article was already there, we should upvote it
if not created:
if article.status == "REJECTED":
return None
# Always upvote the article, except if it was rejected before.
# It's either a new one, and adding it count as a vote, or it existed
# already, and this is a vote.
if article.status == "REJECTED":
return None
# Let's add the tags
if tags:
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment