Make the Django 1.6 support more explicit for PR #218

fix_request_path_info
Diederik van der Boor 2016-06-06 15:26:48 +02:00
parent 51669e2ed1
commit 0ce882dd7b
1 changed files with 4 additions and 1 deletions

View File

@ -100,7 +100,10 @@ def translate_polymorphic_filter_definitions_in_args(queryset_model, args, using
Returns: modified Q objects
"""
q_objects = [q if django.VERSION < (1, 6) else q.clone() for q in args]
if django.VERSION >= (1, 6):
q_objects = [q.clone() for q in args]
else:
q_objects = args # NOTE: edits existing objects in place.
return [translate_polymorphic_Q_object(queryset_model, q, using=using) for q in q_objects]