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:
1
app.py
1
app.py
@@ -81,6 +81,7 @@ def scan():
|
|||||||
# Run
|
# Run
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
# If there are no users, create admin account
|
# If there are no users, create admin account
|
||||||
|
with app.app_context():
|
||||||
if User.query.count() == 0:
|
if User.query.count() == 0:
|
||||||
admin = User(username="admin", password="admin", is_admin=True)
|
admin = User(username="admin", password="admin", is_admin=True)
|
||||||
db.session.add(admin)
|
db.session.add(admin)
|
||||||
|
|||||||
Reference in New Issue
Block a user