fix 500
This commit is contained in:
@@ -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'))
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user