Skip to content

Commit

Permalink
Revert this part, it only works with DRF 3.15+
Browse files Browse the repository at this point in the history
  • Loading branch information
intgr committed May 9, 2024
1 parent ff4fb03 commit 4f3707f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rest_framework_nested/relations.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"""
from __future__ import unicode_literals, annotations
from functools import reduce # import reduce from functools for compatibility with python 3
from typing import Any, TypeVar
from typing import Any, TypeVar, Generic

from django.core.exceptions import ObjectDoesNotExist
from django.db.models import Model
Expand All @@ -18,7 +18,7 @@
T_Model = TypeVar('T_Model', bound=Model)


class NestedHyperlinkedRelatedField(HyperlinkedRelatedField[T_Model]):
class NestedHyperlinkedRelatedField(HyperlinkedRelatedField, Generic[T_Model]):
lookup_field = 'pk'
parent_lookup_kwargs = {
'parent_pk': 'parent__pk'
Expand Down

0 comments on commit 4f3707f

Please sign in to comment.