Fix Python 2.7 compatibility

This commit is contained in:
Iwo Herka 2018-06-08 17:13:20 +02:00
parent 00562c4d88
commit df9c4b66fa
2 changed files with 7 additions and 3 deletions

View file

@ -1,3 +1,5 @@
# -*- coding: utf-8 -*-
'''
Queryset.
@ -259,7 +261,7 @@ class EavQuerySet(QuerySet):
Pass *args* and *kwargs* through ``eav_filter``, then pass to
the ``models.Manager`` filter method.
'''
return super().filter(*args, **kwargs).distinct()
return super(self.__class__, self).filter(*args, **kwargs).distinct()
@eav_filter
def exclude(self, *args, **kwargs):
@ -267,7 +269,7 @@ class EavQuerySet(QuerySet):
Pass *args* and *kwargs* through ``eav_filter``, then pass to
the ``models.Manager`` exclude method.
'''
return super().exclude(*args, **kwargs).distinct()
return super(self.__class__, self).exclude(*args, **kwargs).distinct()
@eav_filter
def get(self, *args, **kwargs):
@ -275,4 +277,4 @@ class EavQuerySet(QuerySet):
Pass *args* and *kwargs* through ``eav_filter``, then pass to
the ``models.Manager`` get method.
'''
return super().get(*args, **kwargs)
return super(self.__class__, self).get(*args, **kwargs)

View file

@ -1,3 +1,5 @@
# -*- coding: utf-8 -*-
'''
Validtors.