diff options
| author | Tim Graham <timograham@gmail.com> | 2013-08-29 11:09:58 -0400 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2013-08-29 12:14:40 -0400 |
| commit | 10d15f79e5e2ca7b733e2bf1860e1778c3a712dc (patch) | |
| tree | 1f7b19dab15a065fc1e5713dc1afa90f950316cf /django | |
| parent | ef1259342b46cd4b63678a4acddf2a2b631d342c (diff) | |
[1.6.x] 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.
Backport of f19a3669b8 from master
Diffstat (limited to 'django')
| -rw-r--r-- | django/db/models/fields/__init__.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/django/db/models/fields/__init__.py b/django/db/models/fields/__init__.py index 0b5e7d4782..e2f8c6c48e 100644 --- a/django/db/models/fields/__init__.py +++ b/django/db/models/fields/__init__.py @@ -385,6 +385,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'): |
