Исправление на поле select

This commit is contained in:
2024-11-07 16:30:47 +03:00
parent f0f88f28c5
commit 2ba5b63b65
3 changed files with 10 additions and 5 deletions

View File

@@ -9,14 +9,14 @@ def auth():
return render_template('auth.html')
else:
data = request.form.to_dict()
data['table'] = 'internal_users' if 'internal' in data else 'external_users'
print(data)
auth_data = auth_model(data)
if auth_data.status:
session.update({
'login': auth_data.result[0]['login'],
'access_user': data['access'],
'role': auth_data.result[0]['user_role'],
'db_config': current_app.config['db_config'],
'access_user': 'in' if 'internal' in data else 'ext',
'permanent': True
})
return redirect(url_for('index'))