require_server_admin: Cut a redundant bit of request-mutation.

The only place this attribute is used is in `update_user_activity`,
called only in `process_client`, which won't happen if we end up
returning a redirect just below.  If we don't, we go and call
`add_logging_data` just after, which takes care of this already.
This commit is contained in:
Greg Price
2017-11-03 14:48:42 -07:00
committed by Tim Abbott
parent b871aa9622
commit 1a540241a9

View File

@@ -417,7 +417,6 @@ def require_server_admin(view_func):
@wraps(view_func)
def _wrapped_view_func(request, *args, **kwargs):
# type: (HttpRequest, *Any, **Any) -> HttpResponse
request._query = view_func.__name__
if not request.user.is_staff:
return HttpResponseRedirect(settings.HOME_NOT_LOGGED_IN)