mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-20 14:29:51 -04:00
Make sure caseworking users clear their invite
There was a bug where caseworking users skipped the part of the invite flow where their invite was cleared from the session. This caused a 500 if they later tried to create another service. This commit makes sure that both types of user have the invite cleared from the session after accepting it.
This commit is contained in:
@@ -62,13 +62,13 @@ def old_service_dashboard(service_id):
|
||||
@user_has_permissions('view_activity', 'send_messages')
|
||||
def service_dashboard(service_id):
|
||||
|
||||
if not current_user.has_permissions('view_activity'):
|
||||
return redirect(url_for('main.choose_template', service_id=service_id))
|
||||
|
||||
if session.get('invited_user'):
|
||||
session.pop('invited_user', None)
|
||||
session['service_id'] = service_id
|
||||
|
||||
if not current_user.has_permissions('view_activity'):
|
||||
return redirect(url_for('main.choose_template', service_id=service_id))
|
||||
|
||||
return render_template(
|
||||
'views/dashboard/dashboard.html',
|
||||
updates_url=url_for(".service_dashboard_updates", service_id=service_id),
|
||||
|
||||
Reference in New Issue
Block a user