From 0bd68aa1adb22558c0d62999e82261ea78bca8cc Mon Sep 17 00:00:00 2001 From: Leo Q Date: Thu, 14 Sep 2023 16:23:06 +0800 Subject: [PATCH] make avatar optional --- helpdesk/models/user.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/helpdesk/models/user.py b/helpdesk/models/user.py index 96040025..fe4b3340 100644 --- a/helpdesk/models/user.py +++ b/helpdesk/models/user.py @@ -1,7 +1,7 @@ # coding: utf-8 import logging -from typing import List +from typing import List, Optional from pydantic import BaseModel, validator @@ -14,7 +14,7 @@ class User(BaseModel): name: str email: str roles: List[str] = [] - avatar: str = None + avatar: Optional[str] = None @property def is_authenticated(self) -> bool: