powa-team / powa-web

PoWA user interface
http://powa.readthedocs.io/
73 stars 30 forks source link

Fixe explain query with like statement #21

Closed dblugeon closed 7 years ago

dblugeon commented 7 years ago

Hello Dalibo team This pull request fixe "TypeError: 'dict' object does not support indexing" error by adding call text function from sqlalchemy.

This error occurs when the powa-web application explains a query with like statement '%'.

rjuju commented 7 years ago

Hello.

Indeed, thanks a lot for the patch! Sorry for the delay.

Just some nitpicking:

Thanks in advance.

dblugeon commented 7 years ago

Hello @rjuju Sorry for the delay. ^^ I fix the import text. After checking, the sqlalchemy.text function is an alias to sqlalchemy.sql.text.

I tested with an virtualenv with sqlalchemy==0.8 . It's ok.

Sorry for the commits,I failed my rebasing. Do you want I remake my pr ?

rjuju commented 7 years ago

Thanks for checking!, and sorry for the delay.

I personnally prefer clean git history. Maybe you can just rebase locally and push force, the PR should be automatically updated. Otherwise I can handle it directly and commit it with you as the author.

dblugeon commented 7 years ago

Thanks for your suggestion about push force. It worked!

The pr history is more cleaner.

rjuju commented 7 years ago

Ah good news:)

Thanks a lot for the fix!