summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorChase <adeodatus@users.noreply.github.com>2016-01-19 22:36:15 -0800
committerMike Bayer <mike_mp@zzzcomputing.com>2016-01-20 09:27:09 -0500
commitf039219eedc22dbb96b4e00fac7ff5e946e2f72d (patch)
tree826cc7f51396d429f2a59b4392a18d12cc26944e /lib
parent23e60cd8ebc8fc5214ce6118942974cb27bda5f8 (diff)
downloadsqlalchemy-f039219eedc22dbb96b4e00fac7ff5e946e2f72d.tar.gz
Fix ArrayOfEnum's handling of empty arrays.
Prior to this change a value of `'{}'` would split into the list `['']`. (cherry picked from commit a2badb751f09299c925bd96a9fd2e76acca04269)
Diffstat (limited to 'lib')
-rw-r--r--lib/sqlalchemy/dialects/postgresql/base.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/sqlalchemy/dialects/postgresql/base.py b/lib/sqlalchemy/dialects/postgresql/base.py
index 363f5c58e..e562177a7 100644
--- a/lib/sqlalchemy/dialects/postgresql/base.py
+++ b/lib/sqlalchemy/dialects/postgresql/base.py
@@ -544,7 +544,7 @@ use the following workaround type::
def handle_raw_string(value):
inner = re.match(r"^{(.*)}$", value).group(1)
- return inner.split(",")
+ return inner.split(",") if inner else []
def process(value):
if value is None: