Make the Django 1.6 support more explicit for PR #218
This commit is contained in:
@@ -100,7 +100,10 @@ def translate_polymorphic_filter_definitions_in_args(queryset_model, args, using
|
|||||||
|
|
||||||
Returns: modified Q objects
|
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]
|
return [translate_polymorphic_Q_object(queryset_model, q, using=using) for q in q_objects]
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user