diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2013-04-22 17:24:42 -0400 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2013-04-22 17:24:42 -0400 |
| commit | b6c523d25550cfa01cbe7e9dd24dd1179a32eae8 (patch) | |
| tree | 60c5cf727f4c9ec1d26822bf8ae5185d71b25979 /lib | |
| parent | 9731e06b387602eb6a151df03bea14e39b748a80 (diff) | |
| parent | 63c211f42730011760aa8e3f88b2171b23bc0a60 (diff) | |
| download | sqlalchemy-b6c523d25550cfa01cbe7e9dd24dd1179a32eae8.tar.gz | |
merge default
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/sqlalchemy/dialects/postgresql/base.py | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/sqlalchemy/dialects/postgresql/base.py b/lib/sqlalchemy/dialects/postgresql/base.py index 82660d96c..5d9368893 100644 --- a/lib/sqlalchemy/dialects/postgresql/base.py +++ b/lib/sqlalchemy/dialects/postgresql/base.py @@ -671,11 +671,9 @@ class ARRAY(sqltypes.Concatenable, sqltypes.TypeEngine): def _proc_array(self, arr, itemproc, dim, collection): if dim is None: - if arr is None: - arr = [] - else: - arr = list(arr) - if dim == 1 or dim is None and not hasattr(arr[0], '__iter__'): + arr = list(arr) + if dim == 1 or dim is None and ( + not arr or not hasattr(arr[0], '__iter__')): if itemproc: return collection(itemproc(x) for x in arr) else: |
