Fix get_optional_database_session to handle uninitialized database

- Moved RuntimeError catch to encompass get_db_session() call
- Previously only caught during import, not during execution
- Now properly yields None when database not initialized
- Fixes test_add_series_endpoint_authenticated test failure
This commit is contained in:
2026-01-24 21:39:31 +01:00
parent 46271a9845
commit 8647da8474
3 changed files with 21 additions and 22 deletions

View File

@@ -7,7 +7,6 @@ This module provides utilities for checking and validating media files
from pathlib import Path
from typing import Dict, Optional, Union
# Standard media file names as defined by Kodi/Plex conventions
POSTER_FILENAME = "poster.jpg"
LOGO_FILENAME = "logo.png"