Fix typing of associations in user model
This commit is contained in:
parent
4d9d43b0f0
commit
c04d9bbd44
1 changed files with 2 additions and 2 deletions
|
@ -1,5 +1,5 @@
|
|||
"Script for everything User related in the database"
|
||||
from typing import List
|
||||
from typing import List, Optional
|
||||
|
||||
from models import db
|
||||
|
||||
|
@ -25,7 +25,7 @@ class User(db.Model):
|
|||
def association_list(self) -> List[str]:
|
||||
return self.associations.split(",")
|
||||
|
||||
def configure(self, username: str, admin: bool, bias: int, associations: List[str] = None) -> None:
|
||||
def configure(self, username: str, admin: bool, bias: int, associations: Optional[List[str]] = None) -> None:
|
||||
"""Configure the User"""
|
||||
if associations is None:
|
||||
associations = []
|
||||
|
|
Loading…
Reference in a new issue