mirror of
https://github.com/Glitchy-Sheep/boosty-downloader.git
synced 2026-10-14 21:33:23 +00:00
[PR #79] [CLOSED] Fix: Handle empty post titles with consistent fallback #96
Labels
No labels
api-drift
bug
ci
documentation
enhancement
enhancement
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Glitchy-Sheep/boosty-downloader#96
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Glitchy-Sheep/boosty-downloader/pull/79
Author: @schuigintou
Created: 12/13/2025
Status: ❌ Closed
Base:
dev← Head:fix/handle-empty-post-titles📝 Commits (1)
7c809a4fix: 🐛 handle empty post titles with consistent fallback📊 Changes
5 files changed (+14 additions, -5 deletions)
View changed files
📝
boosty_downloader/src/application/mappers/post_mapper.py(+1 -1)📝
boosty_downloader/src/application/use_cases/check_total_posts.py(+5 -1)📝
boosty_downloader/src/application/use_cases/download_all_posts.py(+1 -1)📝
boosty_downloader/src/application/use_cases/download_specific_post.py(+6 -1)📝
boosty_downloader/src/infrastructure/boosty_api/models/post/post.py(+1 -1)📄 Description
📌 Fix: Handle empty post titles with consistent fallback
📝 Description
Posts with empty or missing title fields from the Boosty API were causing inconsistent behavior across different use cases (downloading, reporting, etc.), and triggering Pydantic validation errors when title was None.
This PR introduces a unified fallback mechanism that generates a consistent placeholder title using the post ID (first 8 characters) whenever the title is empty or missing. The fix is applied at multiple layers to ensure all parts of the application handle empty titles the same way.
Changes include:
PostDTOmodel to allowtitleto be optional (str | None).post_mapperto apply the fallback during domain object creation.titlewasNone.🔄 Changelog
nullfor post title.PostDTO.titlefield is now optional (str | None)."Not title (id_{post_id[:8]})") across all use cases.download_all_posts,download_specific_post, andcheck_total_postsuse cases to use the same fallback logic.🎯 Related Issue
Closes #78
✅ Checklist
make testand your own judgment)make lint && make format)🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.