Skip to content

Commit

Permalink
Explicitly use SECTION_ITEM_MODEL to ensure the desired section field…
Browse files Browse the repository at this point in the history
…s are present on potential subclasses
  • Loading branch information
niran committed Mar 15, 2012
1 parent c60550f commit 0005aa8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions armstrong/core/arm_sections/backends.py
@@ -1,6 +1,6 @@
from django.db.models import Q from django.db.models import Q


from .utils import get_section_relations from .utils import get_section_relations, get_item_model_class




class ItemFilter(object): class ItemFilter(object):
Expand All @@ -20,7 +20,7 @@ def filter_objects_by_section(self, rels, section):
q = Q(**kwargs_list[0]) q = Q(**kwargs_list[0])
for kwargs in kwargs_list[1:]: for kwargs in kwargs_list[1:]:
q |= Q(**kwargs) q |= Q(**kwargs)
return self.get_manager(rels[0].model).filter(q) return self.get_manager(get_item_model_class()).filter(q)


def process_items(self, items): def process_items(self, items):
""" """
Expand Down

0 comments on commit 0005aa8

Please sign in to comment.