aboutsummaryrefslogtreecommitdiff
path: root/src/web/models/__init__.py
diff options
context:
space:
mode:
authorCédric Bonhomme <cedric@cedricbonhomme.org>2016-04-07 00:00:37 +0200
committerCédric Bonhomme <cedric@cedricbonhomme.org>2016-04-07 00:00:37 +0200
commit181ee8dced7cccc687136c6f35faf2bff1d22d23 (patch)
tree7a2aea7553433957be0455694a7b39e91668dd42 /src/web/models/__init__.py
parentcommit the session after deleting old articles. (diff)
parentFixed merge conflicts. (diff)
downloadnewspipe-181ee8dced7cccc687136c6f35faf2bff1d22d23.tar.gz
newspipe-181ee8dced7cccc687136c6f35faf2bff1d22d23.tar.bz2
newspipe-181ee8dced7cccc687136c6f35faf2bff1d22d23.zip
Fixed merge conflicts.
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