Don’t ask for organisation type when we know it

Every time someone adds a new service we ask them what kind of
organisation they work for.

We can look this up based on the user’s email address now. So we should
only ask the question if:
- we don’t know about the organisation
- or we haven’t set what type of organisation it is (this shouldn’t be
  possible on productions because we’ve populated the column for all
  existing organisations and it’s impossible to add a new one without
  setting it
This commit is contained in:
Chris Hill-Scott
2019-04-18 12:44:18 +01:00
parent 156ae9931f
commit 08e9b35d7a
6 changed files with 71 additions and 15 deletions

View File

@@ -39,7 +39,9 @@ def test_sign_in_explains_other_browser(logged_in_client, api_user_active, mocke
def test_doesnt_redirect_to_sign_in_if_no_session_info(
client_request, api_user_active
client_request,
api_user_active,
mock_get_organisation_by_domain,
):
assert api_user_active.current_session_id is None