feat/app-settings #2

Merged
zwitschi merged 3 commits from feat/app-settings into main 2025-10-25 19:36:37 +02:00
2 changed files with 4 additions and 1 deletions
Showing only changes of commit 75f533b87b - Show all commits

View File

@@ -75,7 +75,7 @@ def update_css_settings(payload: CSSSettingsPayload, db: Session = Depends(get_d
]
except ValueError as exc:
raise HTTPException(
status_code=status.HTTP_422_UNPROCESSABLE_ENTITY,
status_code=status.HTTP_422_UNPROCESSABLE_CONTENT,
detail=str(exc),
) from exc
return CSSSettingsResponse(

View File

@@ -68,10 +68,13 @@ def setup_database() -> Generator[None, None, None]:
@pytest.fixture()
def db_session() -> Generator[Session, None, None]:
Base.metadata.drop_all(bind=engine)
Base.metadata.create_all(bind=engine)
session = TestingSessionLocal()
try:
yield session
finally:
session.rollback()
session.close()