flask-blog icon indicating copy to clipboard operation
flask-blog copied to clipboard

Get_all_posts only ever returns one entry

Open yamatt opened this issue 11 years ago • 0 comments

May only apply to SQLite engine

It's weird because:

>>> from models.interface import DatabaseInterface
>>> import settings

>>> db = DatabaseInterface(settings.DATABASE_ENGINE, settings.DATABASE_CONNECTION_STRING)
>>> db.engine.get_all_posts()

[<models.sqlite.Post object at 0x7f9c181da0d0>]
>>> # returns just one. WTF?

>>> var c = db.engine.cursor.execute("""SELECT rowid, name, title, content, user, updated, published FROM posts""") # same SQL statement run on the cursor
>>> len(c)
7
>>> # how is that possible?

yamatt avatar Oct 30 '13 22:10 yamatt