Update powerdnsadmin/routes/admin.py

Looks good to me

Co-authored-by: Corubba <97832352+corubba@users.noreply.github.com>
This commit is contained in:
AdvanticGmbH 2022-06-29 08:56:01 +02:00 committed by GitHub
parent cfab13824d
commit 3c68b611c6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -613,12 +613,9 @@ def edit_account(account_name=None):
account = Account.query.filter( account = Account.query.filter(
Account.name == account_name).first() Account.name == account_name).first()
all_accounts = Account.query.all() all_accounts = Account.query.all()
accounts = {} accounts = {acc.id: acc for acc in all_accounts}
domains = Domain.query.all() domains = Domain.query.all()
for acc in all_accounts:
accounts[acc.id] = acc
if request.method == 'GET': if request.method == 'GET':
if account_name is None or not account: if account_name is None or not account:
return render_template('admin_edit_account.html', return render_template('admin_edit_account.html',