Skip to content

Commit 967dabc

Browse files
committed
Fixed a bug with index inheritance.
Fields would seem to not obey the MRO while method did. Thanks to ironfroggy for the report!
1 parent 9b10dd9 commit 967dabc

File tree

2 files changed

+109
-75
lines changed

2 files changed

+109
-75
lines changed

haystack/indexes.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ def __new__(cls, name, bases, attrs):
1515
# Inherit any fields from parent(s).
1616
try:
1717
parents = [b for b in bases if issubclass(b, SearchIndex)]
18+
# Simulate the MRO.
19+
parents.reverse()
1820

1921
for p in parents:
2022
fields = getattr(p, 'fields', None)

0 commit comments

Comments
 (0)