mirror of
https://github.com/lfnovo/open-notebook.git
synced 2026-04-29 03:50:04 +00:00
Fix issue with model defaults and bump version
This commit is contained in:
parent
68cd7d7dda
commit
2f2cdabd2d
8 changed files with 83 additions and 49 deletions
|
|
@ -1,6 +1,5 @@
|
|||
from typing import ClassVar, Optional
|
||||
|
||||
from loguru import logger
|
||||
from pydantic import BaseModel
|
||||
|
||||
from open_notebook.database.repository import (
|
||||
|
|
@ -37,8 +36,10 @@ class DefaultModels(BaseModel):
|
|||
def load(self):
|
||||
result = repo_query("SELECT * FROM open_notebook:default_models;")
|
||||
if result:
|
||||
logger.debug(result)
|
||||
return DefaultModels(**result[0])
|
||||
result = result[0]
|
||||
dm = DefaultModels(**result)
|
||||
return dm
|
||||
return DefaultModels()
|
||||
|
||||
@classmethod
|
||||
def update(self, data):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue