Skip to content

Commit

Permalink
Added version checking for MPTTChangeList.get_queryset handling of re…
Browse files Browse the repository at this point in the history
…quest argument.
  • Loading branch information
melinath committed May 10, 2011
1 parent 534c180 commit 38705b4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion mptt/admin.py
Expand Up @@ -18,7 +18,10 @@

class MPTTChangeList(ChangeList):
def get_query_set(self, request):
qs = super(MPTTChangeList, self).get_query_set(request)
if django.VERSION < (1, 3):
qs = super(MPTTChangeList, self).get_query_set()
else:
qs = super(MPTTChangeList, self).get_query_set(request)

# always order by (tree_id, left)
tree_id = qs.model._mptt_meta.tree_id_attr
Expand Down

0 comments on commit 38705b4

Please sign in to comment.