Permalink
Browse files

Merge pull request #54 from rdunklau/patch-1

Truth testing on a table causes TypeError
  • Loading branch information...
2 parents a05d15a + 829950d commit e8450c488a4287fabcf06cf9028dcc0a2cf54289 @mitsuhiko committed Oct 6, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 flaskext/sqlalchemy.py
View
@@ -451,7 +451,7 @@ def __new__(cls, name, bases, d):
# attach a primary key to support model inheritance that does
# not use joins. We also don't want a table name if a whole
# table is defined
- if not tablename and not d.get('__table__') and \
+ if not tablename and not d.get('__table__') is None and \
_defines_primary_key(d):
def _join(match):
word = match.group()

0 comments on commit e8450c4

Please sign in to comment.