From: Mike Bayer Date: Sat, 29 Dec 2007 20:52:50 +0000 (+0000) Subject: remove "is None" from boolean tests X-Git-Tag: rel_0_4_2~6 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7cc356a7011125ab6cec0834f77b5f0c23992309;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git remove "is None" from boolean tests --- diff --git a/lib/sqlalchemy/orm/mapper.py b/lib/sqlalchemy/orm/mapper.py index bec5d5c6ee..7cec88e30c 100644 --- a/lib/sqlalchemy/orm/mapper.py +++ b/lib/sqlalchemy/orm/mapper.py @@ -1281,9 +1281,9 @@ class Mapper(object): if ret is not EXT_CONTINUE: row = ret - if not refresh_instance and not skip_polymorphic and self.polymorphic_on is not None: + if not refresh_instance and not skip_polymorphic and self.polymorphic_on: discriminator = row[self.polymorphic_on] - if discriminator is not None: + if discriminator: mapper = self.polymorphic_map[discriminator] if mapper is not self: if ('polymorphic_fetch', mapper) not in context.attributes: