From de741805c58662a51fa6201bcef63fa54dcfb819 Mon Sep 17 00:00:00 2001 From: Steven Loria Date: Sat, 19 Apr 2014 01:37:22 -0400 Subject: [PATCH] Add Role.__init__ --- .../{{cookiecutter.app_name}}/user/models.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/{{cookiecutter.app_name}}/{{cookiecutter.app_name}}/user/models.py b/{{cookiecutter.app_name}}/{{cookiecutter.app_name}}/user/models.py index 9345b84..6baf4f5 100644 --- a/{{cookiecutter.app_name}}/{{cookiecutter.app_name}}/user/models.py +++ b/{{cookiecutter.app_name}}/{{cookiecutter.app_name}}/user/models.py @@ -11,7 +11,6 @@ from {{cookiecutter.app_name}}.database import ( Column, BcryptType, ) -from {{cookiecutter.app_name}}.extensions import bcrypt class Role(CRUDMixin, db.Model): @@ -20,6 +19,9 @@ class Role(CRUDMixin, db.Model): user_id = ReferenceCol('users', nullable=True) user = relationship('User', backref='roles') + def __init__(self, name, **kwargs): + db.Model.__init__(self, name=name, **kwargs) + class User(UserMixin, CRUDMixin, db.Model): __tablename__ = 'users'