From a2badb751f09299c925bd96a9fd2e76acca04269 Mon Sep 17 00:00:00 2001 From: Chase Date: Tue, 19 Jan 2016 22:36:15 -0800 Subject: Fix ArrayOfEnum's handling of empty arrays. Prior to this change a value of `'{}'` would split into the list `['']`. --- lib/sqlalchemy/dialects/postgresql/base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/sqlalchemy/dialects/postgresql/base.py b/lib/sqlalchemy/dialects/postgresql/base.py index 266cfb912..692305319 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: -- cgit v1.2.1