summaryrefslogtreecommitdiff
path: root/django/contrib/postgres/fields/hstore.py
diff options
context:
space:
mode:
authorMariusz Felisiak <felisiak.mariusz@gmail.com>2019-08-14 15:25:35 +0200
committerGitHub <noreply@github.com>2019-08-14 15:25:35 +0200
commit1f8382d34d54061eddc41df6994e20ee38c60907 (patch)
tree392c51868ba9418b218e5618d3e48c7c6221cf41 /django/contrib/postgres/fields/hstore.py
parent0b8d911d280f033154bb43f3da0e72b6175aa708 (diff)
downloaddjango-1f8382d34d54061eddc41df6994e20ee38c60907.tar.gz
Fixed #30672 -- Fixed crash of JSONField/HStoreField key transforms on expressions with params.
Regression in 4f5b58f5cd3c57fee9972ab074f8dc6895d8f387. Thanks Florian Apolloner for the report and helping with tests.
Diffstat (limited to 'django/contrib/postgres/fields/hstore.py')
-rw-r--r--django/contrib/postgres/fields/hstore.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/django/contrib/postgres/fields/hstore.py b/django/contrib/postgres/fields/hstore.py
index 52cdd21507..9548d180c9 100644
--- a/django/contrib/postgres/fields/hstore.py
+++ b/django/contrib/postgres/fields/hstore.py
@@ -86,7 +86,7 @@ class KeyTransform(Transform):
def as_sql(self, compiler, connection):
lhs, params = compiler.compile(self.lhs)
- return '(%s -> %%s)' % lhs, [self.key_name] + params
+ return '(%s -> %%s)' % lhs, params + [self.key_name]
class KeyTransformFactory: