Skip to content

Commit 61f3ccf

Browse files
committed
Merge pull request #3903 from charettes/deprecation-warnings-1.8
Silenced deprecation warnings on Django 1.8.
2 parents 24c4850 + 1a052d6 commit 61f3ccf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

rest_framework/compat.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ def get_all_related_objects(opts):
251251
:param opts: Options instance
252252
:return: list of relations except many-to-many ones
253253
"""
254-
if django.VERSION < (1, 9):
254+
if django.VERSION < (1, 8):
255255
return opts.get_all_related_objects()
256256
else:
257257
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):
264264
:param opts: Options instance
265265
:return: list of many-to-many relations
266266
"""
267-
if django.VERSION < (1, 9):
267+
if django.VERSION < (1, 8):
268268
return opts.get_all_related_many_to_many_objects()
269269
else:
270270
return [r for r in opts.related_objects if r.field.many_to_many]

0 commit comments

Comments
 (0)