mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-09-18 21:50:56 +00:00
Fixing classifiers in load_single_feed to show the same classifiers when loading in get_feed_trainer(). Just needed a rewind().
This commit is contained in:
parent
2bafd2f89e
commit
bc1940bcc0
1 changed files with 5 additions and 5 deletions
|
@ -158,18 +158,18 @@ def apply_classifier_tags(classifiers, story):
|
|||
|
||||
def get_classifiers_for_user(user, feed_id, classifier_feeds=None, classifier_authors=None, classifier_titles=None, classifier_tags=None):
|
||||
if classifier_feeds is None:
|
||||
# print "Fetching Feeds"
|
||||
classifier_feeds = MClassifierFeed.objects(user_id=user.pk, feed_id=feed_id)
|
||||
else: classifier_feeds.rewind()
|
||||
if classifier_authors is None:
|
||||
# print "Fetching Authors"
|
||||
classifier_authors = MClassifierAuthor.objects(user_id=user.pk, feed_id=feed_id)
|
||||
else: classifier_authors.rewind()
|
||||
if classifier_titles is None:
|
||||
# print "Fetching Titles"
|
||||
classifier_titles = MClassifierTitle.objects(user_id=user.pk, feed_id=feed_id)
|
||||
else: classifier_titles.rewind()
|
||||
if classifier_tags is None:
|
||||
# print "Fetching Tags"
|
||||
classifier_tags = MClassifierTag.objects(user_id=user.pk, feed_id=feed_id)
|
||||
|
||||
else: classifier_tags.rewind()
|
||||
|
||||
payload = {
|
||||
'feeds': dict([(f.feed_id, f.score) for f in classifier_feeds]),
|
||||
'authors': dict([(a.author, a.score) for a in classifier_authors]),
|
||||
|
|
Loading…
Add table
Reference in a new issue