mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-20 14:29:51 -04:00
Redirect to dashboard if this isn't the first service
There's no need to show the tour again if the user has previously created a service so just redirect to the dashboard instead.
This commit is contained in:
@@ -43,7 +43,12 @@ def add_service():
|
||||
user_id=session['user_id'],
|
||||
email_from=email_from)
|
||||
session['service_id'] = service_id
|
||||
return redirect(url_for('main.tour', page=1))
|
||||
|
||||
services = service_api_client.get_services({'user_id': session['user_id']}).get('data', [])
|
||||
if (len(services) > 1):
|
||||
return redirect(url_for('main.service_dashboard', service_id=service_id))
|
||||
else:
|
||||
return redirect(url_for('main.tour', page=1))
|
||||
else:
|
||||
return render_template(
|
||||
'views/add-service.html',
|
||||
|
||||
Reference in New Issue
Block a user