mirror of
https://gitea.mueller.network/extern/django-helpdesk.git
synced 2024-12-26 16:48:50 +01:00
PEP-8 fixes
This commit is contained in:
parent
eee82015f7
commit
a11c595a7c
@ -1060,7 +1060,7 @@ class KBItem(models.Model):
|
||||
An item within the knowledgebase. Very straightforward question/answer
|
||||
style system.
|
||||
"""
|
||||
voted_by= models.ManyToManyField(settings.AUTH_USER_MODEL)
|
||||
voted_by = models.ManyToManyField(settings.AUTH_USER_MODEL)
|
||||
category = models.ForeignKey(
|
||||
KBCategory,
|
||||
on_delete=models.CASCADE,
|
||||
|
@ -46,7 +46,7 @@ def vote(request, item):
|
||||
item = get_object_or_404(KBItem, pk=item)
|
||||
vote = request.GET.get('vote', None)
|
||||
if vote in ('up', 'down'):
|
||||
if request.user not in item.voted_by:
|
||||
if request.user not in item.voted_by:
|
||||
|
||||
item.votes += 1
|
||||
if vote == 'up':
|
||||
|
Loading…
Reference in New Issue
Block a user