Skip to content

Fix potential image_exist bool desync with reality #535

Description

@georgelgeback

In routes/news_router.py, we set image_exist to true when an image is uploaded (in post_news_image). Bit if we get an error while writing the image to disk, this bool is still set to true which causes a desync with reality. The way things work now this is not a large issue, but it's always good to be able to trust fields like this. I expect a try/except statement around the file writing might be sufficient, capturing OSError.

Activity

  1. added theissue type on May 5, 2026
  2. self-assigned this
    on May 8, 2026
  3. linked a pull request that will close this issueSolution for issue 535 #538on May 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions