update
This commit is contained in:
parent
c7c0f7536d
commit
96666520e1
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -1,3 +1,5 @@
|
|||
import datetime
|
||||
|
||||
from fastapi import HTTPException
|
||||
from sqlalchemy import update
|
||||
from sqlalchemy.orm import Session
|
||||
|
|
@ -56,6 +58,7 @@ class AutoController:
|
|||
@staticmethod
|
||||
def create(db: Session, _model: str, _input: dict):
|
||||
m = model_name_to_class(_model)
|
||||
_input['created_at'] = datetime.datetime.now()
|
||||
obj = m(**_input)
|
||||
db.add(obj)
|
||||
db.commit()
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue