mirror of
https://github.com/viq/NewsBlur.git
synced 2025-09-18 21:43:31 +00:00
Speeding up score calculation.
This commit is contained in:
parent
fc6672bab0
commit
d33031210e
1 changed files with 2 additions and 1 deletions
|
@ -2,6 +2,7 @@ from django.db import models
|
|||
from django.contrib.auth.models import User
|
||||
import datetime
|
||||
from apps.rss_feeds.models import Feed, Story, StoryAuthor, Tag
|
||||
from utils import json
|
||||
|
||||
class FeatureCategory(models.Model):
|
||||
|
||||
|
@ -111,7 +112,7 @@ def apply_classifier_authors(classifiers, story):
|
|||
|
||||
def apply_classifier_tags(classifiers, story):
|
||||
for classifier in classifiers:
|
||||
if classifier.tag.name in story['story_tags']:
|
||||
if classifier.tag.name in json.decode(story['story_tags']):
|
||||
# print 'Tags: (%s) %s -- %s' % (classifier.tag.name in story['story_tags'], classifier.tag.name, story['story_tags'])
|
||||
return classifier.score
|
||||
return 0
|
||||
|
|
Loading…
Add table
Reference in a new issue