Files
BiblioGame/app/api/config/cruds/library/create.py

15 lines
400 B
Python

from sqlalchemy.orm import Session
from .....schema.config.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")