2

I want to check if table has any users in it in Flask_SQLAlchemy.

I've done that but it doesn't work. Else statement is executed every time on a completely new database without entries.

def check_for_user():
    if User.query.all() is None:
...
    else:
        print("Nope, it doesn't work")


davidism
  • 121,510
  • 29
  • 395
  • 339
SiDzej
  • 72
  • 2
  • 9

0 Answers0