Don't show user as unknown for service history

A commit was added:
600e3affc1

In it, it falls back to the string 'Unknown' for actions done by those
not belonging to the service.

This commit changes the behaviour such that if the user is not in the
list of active users for a service, it will go get the user from the DB
(or redis). This should be fine to do as redis will protect us from most
calls as most of these cases are for platform admins.

This will mean we can now see which user platform admin put a service
live rather than seeing 'Unknown'.
This commit is contained in:
David McDonald
2021-04-06 11:33:56 +01:00
parent 1d64fd6923
commit 4acca3de4d
2 changed files with 8 additions and 2 deletions

View File

@@ -36,7 +36,7 @@ from tests.conftest import SERVICE_ONE_ID, normalize_spaces
'Created an API key called Good key '
'Test User 10:09am '
'Created an API key called Key event returned in non-chronological order '
'Unknown 2:01am '
'Test User 2:01am '
'Created this service and called it Example service'
),
),
@@ -79,7 +79,7 @@ from tests.conftest import SERVICE_ONE_ID, normalize_spaces
(
'10 October 2010',
(
'Unknown 2:01am '
'Test User 2:01am '
'Created this service and called it Example service'
),
),