Skip to content

Fix rendervariations for JPEGField when variation size is None #240

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

Merged
merged 2 commits into from
May 31, 2021
Merged

Fix rendervariations for JPEGField when variation size is None #240

merged 2 commits into from
May 31, 2021

Conversation

jmsmkn
Copy link

@jmsmkn jmsmkn commented May 13, 2021

This PR fixes a bug when running python manage.py rendervariations on a JPEGField when any of the variation sizes are set to None. Previously, the process_variation method would update the width or height of the variation based on the first image that it encounters, then all subsequent images would be rendered at that size, rather than the full size requested by the variation.

Copy link
Owner

@codingjoe codingjoe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch! Thanks, @jmsmkn, much appreciated!

@codecov
Copy link

codecov bot commented May 31, 2021

Codecov Report

Merging #240 (346fde6) into master (4598f27) will increase coverage by 2.18%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #240      +/-   ##
==========================================
+ Coverage   95.22%   97.40%   +2.18%     
==========================================
  Files           5        5              
  Lines         272      270       -2     
==========================================
+ Hits          259      263       +4     
+ Misses         13        7       -6     
Impacted Files Coverage Δ
stdimage/models.py 96.61% <100.00%> (+1.63%) ⬆️
stdimage/management/commands/rendervariations.py 100.00% <0.00%> (+5.35%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4598f27...346fde6. Read the comment docs.

@codingjoe codingjoe merged commit 5c72f04 into codingjoe:master May 31, 2021
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.

2 participants