Commit 6a5817ad authored by okhin's avatar okhin 🚴

Linting and removing some non used imports

parent 07562156
Pipeline #2501 passed with stages
in 3 minutes and 4 seconds
from django.db import models
from django.utils.translation import ugettext_lazy as _
from django.core import files
from django.core.files.base import ContentFile
from taggit.managers import TaggableManager
from newspaper import Article as ArticleParser
......@@ -10,9 +9,7 @@ from django_fsm import FSMField, transition, RETURN_VALUE
from io import BytesIO
from datetime import datetime
from tempfile import NamedTemporaryFile
from project.settings import env
from rp.utils import cleanup_url
......@@ -158,14 +155,15 @@ class Article(VoteMixin):
else:
return self.status
@transition(field=status, source='NEW', target='NEW', permission="rp.can_vote")
@transition(field=status, source='NEW', target='NEW',
permission="rp.can_vote")
@transition(field=status, source='DRAFT', target='DRAFT',
permission="rp.can_vote")
def downvote(self, by=None):
"""
Downvote the article score for the given user and remove previous votes.
Draft articles can be downvoted but will not be moved back in the
_NEW_ queue.
Downvote the article score for the given user and remove previous
votes. Draft articles can be downvoted but will not be moved back in
the _NEW_ queue.
"""
super(Article, self).downvote(by)
......
Markdown is supported
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