helloflask / bootstrap-flask

Bootstrap 4 & 5 helper for your Flask projects.

Home Page:https://bootstrap-flask.readthedocs.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

IndexError: list index out of range

michaelbukachi opened this issue · comments

for k in data[0].__table__.columns._data.keys(): from get_table_titles assumes the data is not empty. An IndexError is thrown for empty tables.

Maybe add the following line to the top of the function:

if not data:
    return []

Thank you for your feedback, fixed in cfb59af.