mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-10 10:03:21 -04:00
Replace Current service with chosen service name.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
from flask import (render_template, redirect, url_for)
|
||||
from flask import (render_template, redirect, url_for, session)
|
||||
from flask_login import login_required, current_user
|
||||
from app.main.dao import services_dao
|
||||
from app.main import main
|
||||
@@ -11,6 +11,7 @@ def choose_service():
|
||||
# If there is only one service redirect
|
||||
# to the service dashboard.
|
||||
if len(services['data']) == 1:
|
||||
session['service_name'] = services['data'][0]['name']
|
||||
return redirect(url_for(
|
||||
'main.service_dashboard', service_id=services['data'][0]['id']))
|
||||
return render_template(
|
||||
|
||||
Reference in New Issue
Block a user