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/145 #146

Closed
wants to merge 2 commits into from
Closed

Fix/145 #146

wants to merge 2 commits into from

Conversation

fabienheureux
Copy link
Contributor

@fabienheureux fabienheureux commented Jan 22, 2022

Fail silently if downloaded image is corrupted

Ticket URL: #145


In some cases, the download image be corrupted, hence having a width of 0 pixels, and causing an integrity error when django attempts to save it in database.

I suggest returning None in this case.
It could be worth adding

TODO

  • Log somewhere that this specific image was not imported
  • Prevent this image from being downloaded again (as it can slow down next imports)

  • Testing
    • CI passes
    • If necessary, tests are added for new or fixed behaviour
    • These changes do not reduce test coverage
  • Documentation.
    • This PR adds or updates documentation
    • Documentation changes are not necessary because:

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.

1 participant