mirror of
https://github.com/kevin-DL/full-stack-fastapi-postgresql.git
synced 2026-01-12 18:25:15 +00:00
✨ Add base class to simplify CRUD (#23)
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
from app import crud
|
||||
from app.core import config
|
||||
from app.models.user import UserCreate
|
||||
from app.schemas.user import UserCreate
|
||||
|
||||
# make sure all SQL Alchemy models are imported before initializing DB
|
||||
# otherwise, SQL Alchemy might fail to initialize properly relationships
|
||||
@@ -21,4 +21,4 @@ def init_db(db_session):
|
||||
password=config.FIRST_SUPERUSER_PASSWORD,
|
||||
is_superuser=True,
|
||||
)
|
||||
user = crud.user.create(db_session, user_in=user_in)
|
||||
user = crud.user.create(db_session, obj_in=user_in)
|
||||
|
||||
Reference in New Issue
Block a user