Skip to content

Handle empty TV first air dates - #496

Merged
felixschndr merged 3 commits into
joostlek:mainfrom
readyrockc:fix-empty-first-air-date
Oct 28, 2026
Merged

felixschndr merged 3 commits into
joostlek:mainfrom
readyrockc:fix-empty-first-air-date

Conversation

@readyrockc

Copy link
Copy Markdown
Contributor

Proposed Changes

The Search API can return TV results where the firstAirDate is "".

When that is the case python-overseerr tries to deserializes it as date, which causes: ValueError: Invalid isoformat string: ''".

I noticed it when I was using the search term "Dredd". Judge Dredd: Mega-City One returns firstAirDate "". This change treats an empty date as None.

With the help of AI (ChatGPT) a regression test was added. 55 tests passed, 36 snapshots passed.

Related Issues

No related issues.

@RafaelSchridi

Copy link
Copy Markdown

Just ran into the same issue, glad theres already a pr.
Do we need to do the same for Seasons and Episodes?

@felixschndr felixschndr added the bugfix Inconsistencies or issues which will cause a problem for users or implementers. label Oct 28, 2026
@felixschndr

Copy link
Copy Markdown
Collaborator

@RafaelSchridi Good question, I checked the Seerr source. Seerr passes TMDB dates through unchanged (server/models/Tv.ts), and per its own types Episode.airDate is string | null and Season.airDate is string. Our Season.air_date and Episode.air_date are already date | None, so null is handled. I haven't seen any evidence of "" there.

@felixschndr
felixschndr merged commit 5eac7a7 into joostlek:main Oct 28, 2026
12 checks passed
felixschndr added a commit that referenced this pull request Oct 28, 2026
)

* Add poster_path, backdrop_path and release_date to Movie/TV models

* Treat Movie's empty release_date as None, like #496 does for TV

---------

Co-authored-by: Felix Schneider <mail@fschneider.me>
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 30, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

bugfix Inconsistencies or issues which will cause a problem for users or implementers.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants