log bugfix
This commit is contained in:
@@ -286,7 +286,7 @@ def get_eventactions(db: Session,eventid: str):
|
||||
|
||||
|
||||
def create_log(db: Session, error:schemas.ErrorCreate):
|
||||
db_log = models.ErrorLog(location=error.location,title=error.title,content=error.content)
|
||||
db_log = models.ErrorLog(title=error.title,location=error.location,content=error.content)
|
||||
db.add(db_log)
|
||||
db.commit()
|
||||
db.refresh(db_log)
|
||||
|
||||
@@ -96,6 +96,6 @@ class EventAction(Base):
|
||||
class ErrorLog(Base):
|
||||
__tablename__ = "errorlog"
|
||||
id = Column(Integer, primary_key=True, index=True)
|
||||
location = Column(String(200))
|
||||
title = Column(String(50))
|
||||
location = Column(String(500))
|
||||
content = Column(String(5000))
|
||||
@@ -142,6 +142,6 @@ class Event(Base):
|
||||
orm_mode = True
|
||||
|
||||
class ErrorCreate(BaseModel):
|
||||
location:str
|
||||
title:str
|
||||
location:str
|
||||
content:str
|
||||
Reference in New Issue
Block a user