Sort users by first and last name in inventory item routes
This commit is contained in:
parent
6d0e27b15e
commit
cace63fd1c
1 changed files with 5 additions and 5 deletions
|
@ -90,7 +90,7 @@ def inventory_item(id):
|
|||
inventory_query = db.session.query(Inventory)
|
||||
item = eager_load_inventory_relationships(inventory_query).filter(Inventory.id == id).first()
|
||||
brands = db.session.query(Brand).order_by(Brand.name).all()
|
||||
users = eager_load_user_relationships(db.session.query(User).order_by(User.first_name)).all()
|
||||
users = eager_load_user_relationships(db.session.query(User).order_by(User.first_name, User.last_name)).all()
|
||||
rooms = eager_load_room_relationships(db.session.query(Room).order_by(Room.name)).all()
|
||||
worklog_query = db.session.query(WorkLog).filter(WorkLog.work_item_id == id)
|
||||
worklog = eager_load_worklog_relationships(worklog_query).all()
|
||||
|
@ -117,10 +117,10 @@ def inventory_item(id):
|
|||
|
||||
@main.route("/inventory_item/new", methods=["GET"])
|
||||
def new_inventory_item():
|
||||
brands = db.session.query(Brand).all()
|
||||
users = eager_load_user_relationships(db.session.query(User)).all()
|
||||
rooms = eager_load_room_relationships(db.session.query(Room)).all()
|
||||
types = db.session.query(Item).all()
|
||||
brands = db.session.query(Brand).order_by(Brand.name).all()
|
||||
users = eager_load_user_relationships(db.session.query(User).order_by(User.first_name, User.last_name)).all()
|
||||
rooms = eager_load_room_relationships(db.session.query(Room).order_by(Room.name)).all()
|
||||
types = db.session.query(Item).order_by(Item.description).all()
|
||||
|
||||
item = Inventory(
|
||||
timestamp=datetime.datetime.now(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue