diff options
| author | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2018-03-14 10:00:07 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-03-14 10:00:07 +0100 |
| commit | feb683c4c2c5ecfb61e4cb490c3e357450c0c0e8 (patch) | |
| tree | fa5f374ddd53399f66425b41dfa48693cb658940 /django | |
| parent | 8f75984c263b89336cdf919c246a56ce49d07ddb (diff) | |
Fixed #29155 -- Fixed crash when database functions are used with pattern lookups.
Thanks Tim Graham and Sergey Fedoseev for reviews.
Diffstat (limited to 'django')
| -rw-r--r-- | django/db/models/lookups.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/django/db/models/lookups.py b/django/db/models/lookups.py index 00eeda1f39..a4c7459bfe 100644 --- a/django/db/models/lookups.py +++ b/django/db/models/lookups.py @@ -397,7 +397,7 @@ class PatternLookup(BuiltinLookup): def process_rhs(self, qn, connection): rhs, params = super().process_rhs(qn, connection) - if params and not self.bilateral_transforms: + if self.rhs_is_direct_value() and params and not self.bilateral_transforms: params[0] = self.param_pattern % connection.ops.prep_for_like_query(params[0]) return rhs, params |
