From 0921a6abbc8246c57f447af7a6ac240778127fae Mon Sep 17 00:00:00 2001 From: aisch Date: Mon, 23 Nov 2015 10:22:50 -0800 Subject: fix postgresql exclude contraint to check when= against None rather than __bool__ eval --- lib/sqlalchemy/dialects/postgresql/ext.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/sqlalchemy/dialects/postgresql') diff --git a/lib/sqlalchemy/dialects/postgresql/ext.py b/lib/sqlalchemy/dialects/postgresql/ext.py index 9b2e3fd73..1a443c2d7 100644 --- a/lib/sqlalchemy/dialects/postgresql/ext.py +++ b/lib/sqlalchemy/dialects/postgresql/ext.py @@ -142,7 +142,7 @@ static/sql-createtable.html#SQL-CREATETABLE-EXCLUDE ) self.using = kw.get('using', 'gist') where = kw.get('where') - if where: + if where is not None: self.where = expression._literal_as_text(where) def copy(self, **kw): -- cgit v1.2.1