aboutsummaryrefslogtreecommitdiff
path: root/src/web/models/__init__.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/web/models/__init__.py')
-rw-r--r--src/web/models/__init__.py8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/web/models/__init__.py b/src/web/models/__init__.py
index d9489dbb..7c50cab3 100644
--- a/src/web/models/__init__.py
+++ b/src/web/models/__init__.py
@@ -88,17 +88,13 @@ def db_create(db):
"Will create the database from conf parameters."
db.create_all()
- role_admin = Role(name="admin")
- role_user = Role(name="user")
-
user1 = User(nickname="admin",
email=os.environ.get("ADMIN_EMAIL",
"root@jarr.localhost"),
pwdhash=generate_password_hash(
os.environ.get("ADMIN_PASSWORD", "password")),
- enabled=True)
- user1.roles.extend([role_admin, role_user])
+ is_admin=True)
db.session.add(user1)
db.session.commit()
- return role_admin, role_user
+ return user1
bgstack15