Merge pull request #766 from frei-style/sort_accounts

Sort accounts by name on 'New Domain' and domain 'Admin'
This commit is contained in:
Khanh Ngo 2020-10-10 14:18:02 +02:00 committed by GitHub
commit b5fc9045f2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -235,7 +235,7 @@ def add():
abort(500)
else:
accounts = Account.query.all()
accounts = Account.query.order_by(Account.name).all()
return render_template('domain_add.html',
templates=templates,
accounts=accounts)
@ -267,7 +267,7 @@ def setting(domain_name):
if not domain:
abort(404)
users = User.query.all()
accounts = Account.query.all()
accounts = Account.query.order_by(Account.name).all()
# get list of user ids to initialize selection data
d = Domain(name=domain_name)