zephyr: Fix typing for cred parameter.

This commit is contained in:
Wyatt Hoodes 2019-07-28 10:45:04 -10:00 committed by Tim Abbott
parent 0834514668
commit 99bd55917e
1 changed files with 3 additions and 1 deletions

View File

@ -13,6 +13,8 @@ import logging
import subprocess
import ujson
from typing import Optional
# Hack for mit.edu users whose Kerberos usernames don't match what they zephyr
# as. The key is for Kerberos and the value is for zephyr.
@ -23,7 +25,7 @@ kerberos_alter_egos = {
@authenticated_json_view
@has_request_variables
def webathena_kerberos_login(request: HttpRequest, user_profile: UserProfile,
cred: str=REQ(default=None)) -> HttpResponse:
cred: Optional[str]=REQ(default=None)) -> HttpResponse:
global kerberos_alter_egos
if cred is None:
return json_error(_("Could not find Kerberos credential"))