fsek / fsek/WebWebWeb

Fix potential image_exist bool desync with reality

Open
#535 0 comments 0 reactions 1 assignee Claimed by @erikmf123 View on GitHub
good first issue
Dominant language
Python
Stars
7
Forks
6
Avg merge
1d 3h
Merged PRs (30d)
8

Description

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.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.