mirror of
https://github.com/open-webui/open-webui
synced 2024-11-24 21:13:59 +00:00
banners: generic exception
This commit is contained in:
parent
16fa454558
commit
655238dcd7
@ -8,7 +8,6 @@ from chromadb import Settings
|
|||||||
from bs4 import BeautifulSoup
|
from bs4 import BeautifulSoup
|
||||||
from typing import TypeVar, Generic
|
from typing import TypeVar, Generic
|
||||||
from pydantic import BaseModel
|
from pydantic import BaseModel
|
||||||
from pydantic.error_wrappers import ValidationError
|
|
||||||
from typing import Optional
|
from typing import Optional
|
||||||
|
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
@ -770,7 +769,7 @@ class BannerModel(BaseModel):
|
|||||||
try:
|
try:
|
||||||
banners = json.loads(os.environ.get("WEBUI_BANNERS", "[]"))
|
banners = json.loads(os.environ.get("WEBUI_BANNERS", "[]"))
|
||||||
banners = [BannerModel(**banner) for banner in banners]
|
banners = [BannerModel(**banner) for banner in banners]
|
||||||
except ValidationError as e:
|
except Exception as e:
|
||||||
print(f"Error loading WEBUI_BANNERS: {e}")
|
print(f"Error loading WEBUI_BANNERS: {e}")
|
||||||
banners = []
|
banners = []
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user