Go straight into org if no trial mode services

You might still belong to some services, but because they’re live
they’re all in your organisation.
This commit is contained in:
Chris Hill-Scott
2019-06-07 13:06:53 +01:00
parent 71dc650db6
commit 1b395c04f3
3 changed files with 14 additions and 5 deletions

View File

@@ -41,7 +41,7 @@ def show_accounts_or_dashboard():
if len(current_user.service_ids) == 1 and not current_user.organisation_ids:
return redirect(url_for('.service_dashboard', service_id=current_user.service_ids[0]))
if len(current_user.organisation_ids) == 1 and not current_user.service_ids:
if len(current_user.organisation_ids) == 1 and not current_user.trial_mode_services:
return redirect(url_for('.organisation_dashboard', org_id=current_user.organisation_ids[0]))
return redirect(url_for('.choose_account'))