15 lines
391 B
Python
15 lines
391 B
Python
from sqlalchemy.orm import Session
|
|
from ....schema.library.base import Base
|
|
|
|
import logging
|
|
logger = logging.getLogger(__name__)
|
|
|
|
def create(session:Session, library:Base):
|
|
logger.debug("Add Library")
|
|
session.add(library)
|
|
logger.debug("Added Library")
|
|
session.commit()
|
|
logger.debug("Committed Library")
|
|
session.refresh(library)
|
|
logger.debug("Rerfreshed Library")
|