diff --git a/iam/api/views.py b/iam/api/views.py index 9ec04a6a..92c4e6b3 100644 --- a/iam/api/views.py +++ b/iam/api/views.py @@ -792,6 +792,11 @@ def get(self, request, pk): if u and error is None: data = {} auth_event = get_object_or_404(AuthEvent, pk=pk) + if auth_event.status in [AuthEvent.STOPPED, AuthEvent.SUSPENDED, AuthEvent.SUCCESS]: + return json_response( + status=400, + error_codename=ErrorCodes.BAD_REQUEST + ) req = {} auth_data = return_auth_data('Ping', req, request, u, auth_event) if 'auth-token' in auth_data: