Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Explicitly use SECTION_ITEM_MODEL to ensure the desired section field…

…s are present on potential subclasses
  • Loading branch information...
commit 0005aa840badf91b5b729b97e41443b8e3edb00b 1 parent c60550f
@niran niran authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 armstrong/core/arm_sections/backends.py
View
4 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):
"""
Please sign in to comment.
Something went wrong with that request. Please try again.