mirror of
https://github.com/django/django.git
synced 2025-10-31 09:41:08 +00:00
Fixed #14786 -- Fixed get_db_prep_lookup calling get_prep_value twice if prepared is False.
Thanks homm for the report and Aramgutang and lrekucki for work on the patch.
This commit is contained in:
@@ -499,6 +499,7 @@ class Field(object):
|
||||
"""
|
||||
if not prepared:
|
||||
value = self.get_prep_lookup(lookup_type, value)
|
||||
prepared = True
|
||||
if hasattr(value, 'get_compiler'):
|
||||
value = value.get_compiler(connection=connection)
|
||||
if hasattr(value, 'as_sql') or hasattr(value, '_as_sql'):
|
||||
|
||||
Reference in New Issue
Block a user