mirror of
https://github.com/StefBuwalda/cal_counter.git
synced 2025-10-30 11:19:59 +00:00
Update app.py
This commit is contained in:
9
app.py
9
app.py
@@ -81,10 +81,11 @@ def scan():
|
||||
# Run
|
||||
if __name__ == "__main__":
|
||||
# If there are no users, create admin account
|
||||
if User.query.count() == 0:
|
||||
admin = User(username="admin", password="admin", is_admin=True)
|
||||
db.session.add(admin)
|
||||
db.session.commit()
|
||||
with app.app_context():
|
||||
if User.query.count() == 0:
|
||||
admin = User(username="admin", password="admin", is_admin=True)
|
||||
db.session.add(admin)
|
||||
db.session.commit()
|
||||
|
||||
app.run(
|
||||
host="0.0.0.0",
|
||||
|
||||
Reference in New Issue
Block a user