From: Chase Date: Wed, 20 Jan 2016 06:36:15 +0000 (-0800) Subject: Fix ArrayOfEnum's handling of empty arrays. X-Git-Tag: rel_1_0_12~51 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f039219eedc22dbb96b4e00fac7ff5e946e2f72d;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git Fix ArrayOfEnum's handling of empty arrays. Prior to this change a value of `'{}'` would split into the list `['']`. (cherry picked from commit a2badb751f09299c925bd96a9fd2e76acca04269) --- diff --git a/lib/sqlalchemy/dialects/postgresql/base.py b/lib/sqlalchemy/dialects/postgresql/base.py index 363f5c58ee..e562177a7f 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: