Refactor user route: remove eager loading from list_users function and enhance default_select to support eager loading with skip relations
This commit is contained in:
parent
91e1e5051a
commit
30ec29d497
3 changed files with 124 additions and 58 deletions
|
|
@ -12,8 +12,6 @@ from ..models import User, Room, Inventory, WorkLog
|
|||
|
||||
@main.route("/users")
|
||||
def list_users():
|
||||
query = eager_load_user_relationships(db.session.query(User)).order_by(User.last_name, User.first_name)
|
||||
users = query.all()
|
||||
return render_template(
|
||||
'table.html',
|
||||
header = user_headers,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue