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_1_0b1~84^2~30 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a2badb751f09299c925bd96a9fd2e76acca04269;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git Fix ArrayOfEnum's handling of empty arrays. Prior to this change a value of `'{}'` would split into the list `['']`. --- diff --git a/lib/sqlalchemy/dialects/postgresql/base.py b/lib/sqlalchemy/dialects/postgresql/base.py index 266cfb9126..692305319c 100644 --- a/lib/sqlalchemy/dialects/postgresql/base.py +++ b/lib/sqlalchemy/dialects/postgresql/base.py @@ -579,7 +579,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: