diff --git a/backend/routers/shows.py b/backend/routers/shows.py index 54f907f..a010c13 100644 --- a/backend/routers/shows.py +++ b/backend/routers/shows.py @@ -109,19 +109,6 @@ def read_shows( shows = session.exec(query.offset(offset).limit(limit)).all() - if shows: - print(f"DEBUG: Loaded {len(shows)} shows") - print(f"DEBUG: First show ID: {shows[0].id}") - print(f"DEBUG: First show Venue: {shows[0].venue}") - print(f"DEBUG: First show Vertical: {shows[0].vertical}") - try: - dump = ShowRead.model_validate(shows[0]).model_dump() - print(f"DEBUG: Serialized Dump: {dump}") - except Exception as e: - print(f"DEBUG: Serialization Error: {e}") - - - return PaginatedResponse( data=shows, meta=PaginationMeta(total=total, limit=limit, offset=offset) diff --git a/backend/schemas.py b/backend/schemas.py index ed56573..58eb5f8 100644 --- a/backend/schemas.py +++ b/backend/schemas.py @@ -59,6 +59,7 @@ class VenueCreate(VenueBase): pass class VenueRead(VenueBase): + model_config = ConfigDict(from_attributes=True) id: int slug: Optional[str] = None @@ -97,6 +98,7 @@ class SongUpdate(SQLModel): # --- Vertical Schema (simple for embedding) --- class VerticalSimple(SQLModel): + model_config = ConfigDict(from_attributes=True) id: int name: str slug: str @@ -226,6 +228,7 @@ class TourCreate(TourBase): pass class TourRead(TourBase): + model_config = ConfigDict(from_attributes=True) id: int slug: Optional[str] = None