mirror of
https://github.com/django-helpdesk/django-helpdesk.git
synced 2025-08-19 04:06:23 +02:00
Merge 0.2.22 bugfix release updates, update copyright year in license, specify python 3.6 or above in setup
This commit is contained in:
@@ -1334,8 +1334,9 @@ class KBItem(models.Model):
|
||||
return super(KBItem, self).save(*args, **kwargs)
|
||||
|
||||
def _score(self):
|
||||
""" Return a score out of 10 or Unrated if no votes """
|
||||
if self.votes > 0:
|
||||
return int(self.recommendations / self.votes)
|
||||
return (self.recommendations / self.votes) * 10
|
||||
else:
|
||||
return _('Unrated')
|
||||
score = property(_score)
|
||||
|
Reference in New Issue
Block a user