Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: handle broken link for the missing image file #4287

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Chadys
Copy link
Contributor

@Chadys Chadys commented Apr 23, 2024

We get an exception when the missing image file has previously been symlinked and for whatever reason the link got broken (it happened to me after upgrading the python version of my project).
When media_file_path is a link but does not exists as a file, this is because the symlink got broken. In that case we can destroy the symlink before trying to link it again (which fails if we don't unlink it first).

Copy link

codecov bot commented Apr 23, 2024

Codecov Report

Merging #4287 (430c303) into master (204b9a7) will increase coverage by 0.07%.
Report is 11 commits behind head on master.
The diff coverage is 50.00%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4287      +/-   ##
==========================================
+ Coverage   88.28%   88.35%   +0.07%     
==========================================
  Files         293      293              
  Lines       16046    16096      +50     
==========================================
+ Hits        14166    14222      +56     
+ Misses       1880     1874       -6     
Files Coverage Δ
src/oscar/apps/catalogue/abstract_models.py 93.41% <50.00%> (-0.13%) ⬇️

... and 9 files with indirect coverage changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant