]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
Fix argument to array() in array._bind_param()
authorAndrew <andrew.sucevic@gmail.com>
Thu, 24 Jul 2014 05:56:50 +0000 (15:56 +1000)
committerMike Bayer <mike_mp@zzzcomputing.com>
Fri, 25 Jul 2014 20:13:35 +0000 (16:13 -0400)
array.__init__() expects a list as its sole parameter but inside _bind_param(), instead of sending a list it's sending each item in the list as a separate argument which is incorrect.

lib/sqlalchemy/dialects/postgresql/base.py

index 369a87f93aacbb6115eeeb7a3823977cc52bff59..afbeddeec11167f318de85de315f3febdbe6ee24 100644 (file)
@@ -695,7 +695,7 @@ class array(expression.Tuple):
         self.type = ARRAY(self.type)
 
     def _bind_param(self, operator, obj):
-        return array(*[
+        return array([
             expression.BindParameter(None, o, _compared_to_operator=operator,
                                      _compared_to_type=self.type, unique=True)
             for o in obj