Commits

Anonymous committed 0be1104

polymorphic relations

  • Participants
  • Parent commits 8e3845d
  • Branches photos

Comments (0)

Files changed (1)

File newsmeme/models/posts.py

     num_posts = db.column_property(
         db.select([db.func.count(post_tags.c.post_id)]).\
             where(db.and_(post_tags.c.tag_id==id,
-                          Post.id==post_tags.c.post_id,
-                          Post.access==Post.PUBLIC)).as_scalar())
+                          BasePost.id==post_tags.c.post_id,
+                          BasePost.access==BasePost.PUBLIC)).as_scalar())