flask-realworld-example-app icon indicating copy to clipboard operation
flask-realworld-example-app copied to clipboard

Feed view is not working properly with sqllite

Open yarsanich opened this issue 5 years ago • 0 comments

Hi,

Thanks for Flask implementation of realworld backend app.

I tried to launch it with sqllite as db. I got an error on feed view.

https://github.com/gothinkster/flask-realworld-example-app/blob/b49f3014f98c8a62ab2ba079b8e8dd11e96180a2/conduit/articles/views.py#L118-L120 returned

AttributeError: 'AppenderQuery' object has no attribute 'is_selectable'

I saw that UserProfile follows relation has defined join, but looks like it is not working properly. I did not try to launch it with PostgreSQL, maybe issue related to DB.

Explicit join works fine

return Article.query.join(UserProfile).join(followers_assoc, (followers_assoc.c.followed_by == Article.author_id)).\
        filter(followers_assoc.c.follower == user_profile_id).\
        order_by(Article.createdAt.desc()).offset(offset).limit(limit).all()

yarsanich avatar Apr 14 '19 15:04 yarsanich