diff options
author | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2016-04-07 00:00:37 +0200 |
---|---|---|
committer | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2016-04-07 00:00:37 +0200 |
commit | 181ee8dced7cccc687136c6f35faf2bff1d22d23 (patch) | |
tree | 7a2aea7553433957be0455694a7b39e91668dd42 /src/web/models/__init__.py | |
parent | commit the session after deleting old articles. (diff) | |
parent | Fixed merge conflicts. (diff) | |
download | newspipe-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__.py | 8 |
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 |