]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
Fix ArrayOfEnum's handling of empty arrays.
authorChase <adeodatus@users.noreply.github.com>
Wed, 20 Jan 2016 06:36:15 +0000 (22:36 -0800)
committerMike Bayer <mike_mp@zzzcomputing.com>
Wed, 20 Jan 2016 14:27:09 +0000 (09:27 -0500)
Prior to this change a value of `'{}'` would split into the list `['']`.
(cherry picked from commit a2badb751f09299c925bd96a9fd2e76acca04269)

lib/sqlalchemy/dialects/postgresql/base.py

index 363f5c58eeffe91841fb562cde2ee0dba346f4b7..e562177a7f846d8b88c54402e98a80c60a3f3c54 100644 (file)
@@ -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: