diff --git a/registration_server.py b/registration_server.py index 8f988ca..2430290 100644 --- a/registration_server.py +++ b/registration_server.py @@ -110,8 +110,9 @@ def registered(): if args.create: print("Creating database table if doesn't exist") - db.create_all() - + with app.app_context(): + db.create_all() + if args.dump: print("Printing content of database.") for p in Participant.query.all():