Permalink
Browse files

Explicitly use SECTION_ITEM_MODEL to ensure the desired section field…

…s are present on potential subclasses
  • Loading branch information...
niran committed Mar 15, 2012
1 parent c60550f commit 0005aa840badf91b5b729b97e41443b8e3edb00b
Showing with 2 additions and 2 deletions.
  1. +2 −2 armstrong/core/arm_sections/backends.py
@@ -1,6 +1,6 @@
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):
@@ -20,7 +20,7 @@ def filter_objects_by_section(self, rels, section):
q = Q(**kwargs_list[0])
for kwargs in kwargs_list[1:]:
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):
"""

0 comments on commit 0005aa8

Please sign in to comment.