mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-03 13:18:57 -04:00
Make new service current service on first use
When you add a new service, it’s probably the one you want to do stuff with. When you get invited, the service you’ve been invited to is probably the one you want to use. This commit adds the ID of the new service or service you’ve been invited to to the session.
This commit is contained in:
@@ -42,7 +42,7 @@ def add_service():
|
||||
restricted=True,
|
||||
user_id=session['user_id'],
|
||||
email_from=email_from)
|
||||
|
||||
session['service_id'] = service_id
|
||||
return redirect(url_for('main.tour', page=1))
|
||||
else:
|
||||
return render_template(
|
||||
|
||||
@@ -34,6 +34,7 @@ def service_dashboard(service_id):
|
||||
|
||||
if session.get('invited_user'):
|
||||
session.pop('invited_user', None)
|
||||
session['service_id'] = service_id
|
||||
return redirect(url_for("main.tour", page=1))
|
||||
|
||||
statistics = statistics_api_client.get_statistics_for_service(service_id)['data']
|
||||
|
||||
Reference in New Issue
Block a user