This commit is contained in:
Mateusz Gruszczyński
2026-03-17 14:37:15 +01:00
parent ac44cc6b31
commit 247bb15ed6
2 changed files with 6 additions and 1 deletions

View File

@@ -137,7 +137,8 @@ def index():
@bp.route('/switch-company/<int:company_id>')
@login_required
def switch_company(company_id):
CompanyService.set_active_company(company_id)
if not CompanyService.switch_company(company_id):
abort(403)
return redirect(url_for('dashboard.index'))