We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 24c4850 + 1a052d6 commit 61f3ccfCopy full SHA for 61f3ccf
rest_framework/compat.py
@@ -251,7 +251,7 @@ def get_all_related_objects(opts):
251
:param opts: Options instance
252
:return: list of relations except many-to-many ones
253
"""
254
- if django.VERSION < (1, 9):
+ if django.VERSION < (1, 8):
255
return opts.get_all_related_objects()
256
else:
257
return [r for r in opts.related_objects if not r.field.many_to_many]
@@ -264,7 +264,7 @@ def get_all_related_many_to_many_objects(opts):
264
265
:return: list of many-to-many relations
266
267
268
return opts.get_all_related_many_to_many_objects()
269
270
return [r for r in opts.related_objects if r.field.many_to_many]
0 commit comments