[REF] Refactor
This commit is contained in:
14
app/api/cruds/library/create.py
Normal file
14
app/api/cruds/library/create.py
Normal file
@@ -0,0 +1,14 @@
|
||||
from sqlalchemy.orm import Session
|
||||
from ....schema.library.library import Library
|
||||
|
||||
import logging
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
def create(session:Session, library:Library):
|
||||
logger.debug("Add Library")
|
||||
session.add(library)
|
||||
logger.debug("Added Library")
|
||||
session.commit()
|
||||
logger.debug("Committed Library")
|
||||
session.refresh(library)
|
||||
logger.debug("Rerfreshed Library")
|
||||
Reference in New Issue
Block a user