Skip to content

Commit

Permalink
Appease type-checker
Browse files Browse the repository at this point in the history
  • Loading branch information
pjvandehaar authored Aug 21, 2023
1 parent c94fefd commit 81a1a9d
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions pheweb/serve/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
import os
import os.path
import sqlite3
from typing import Dict,Tuple,List,Any
from typing import Dict,Tuple,List,Any,Optional


bp = Blueprint('bp', __name__, template_folder='templates', static_folder='static')
Expand Down Expand Up @@ -49,8 +49,10 @@
phenos = {pheno['phenocode']: pheno for pheno in get_phenolist()}


def email_is_allowed(user_email:str = None) -> bool:
if user_email is None: user_email = current_user.email
def email_is_allowed(user_email:Optional[str] = None) -> bool:
if user_email is None:
user_email = current_user.email
assert isinstance(user_email, str), user_email
user_email = user_email.lower()
if not conf.get_login_allowlist(): # anybody gets in!
return True
Expand Down

0 comments on commit 81a1a9d

Please sign in to comment.