~jcsackett/charmworld/bac-tag-constraints

« back to all changes in this revision

Viewing changes to charmworld/views/api.py

  • Committer: Tarmac
  • Author(s): Aaron Bentley
  • Date: 2013-08-06 21:06:58 UTC
  • mfrom: (328.2.13 separate-qa)
  • Revision ID: tarmac-20130806210658-6eau0bkn7o9rmspo
[r=benji][bug=][author=abentley] Separate QA answers from other data.

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
    Charm,
27
27
    CharmFileSet,
28
28
    getfs,
29
 
    QAData,
 
29
    QADataSource,
30
30
)
31
31
from charmworld.search import (
32
32
    InvalidCharmType,
417
417
                    if key != '_id')
418
418
 
419
419
    def _charm_qa(self, charm):
420
 
        qa_data = QAData(self.request.db, charm.qa)
 
420
        qa_data_source = QADataSource.from_db(self.request.db)
 
421
        qa_data = qa_data_source.get_qa_data(charm)
421
422
        categories = [self._format_category(category) for category
422
423
                      in qa_data.qa_categories.values()]
423
424
        scores = qa_data.filtered_scores()