Files
notifications-admin/app/main/dao/roles_dao.py
Rebecca Law abe1d8ae17 108536234: created users and roles data and domain model.
You will need to run the /scripts/bootstrap.sh to create the database for test and the app.
2015-11-25 15:29:12 +00:00

12 lines
196 B
Python

from app import db
from app.models import Roles
def insert_role(role):
db.session.add(role)
db.session.commit()
def get_role_by_id(id):
return Roles.query.filter_by(id=id).first()