-
Notifications
You must be signed in to change notification settings - Fork 60
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: get_size should always return size as tuple of int #111
Conversation
self.picture.width (and height) are now float (since PR#1226)
@fabien-michel What happens if someone updates the picture plugin and is still on the old version o filer? Will this break? |
No, I don't see any case where it can break something. The old filer version behavior was to return int, so parsing int to int is ok. |
@fabien-michel are you able to resolve conflicts please? We've not got permissions to modify this PR |
Codecov Report
@@ Coverage Diff @@
## master #111 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 15 15
Lines 242 244 +2
Branches 45 45
=========================================
+ Hits 242 244 +2
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
I assume the tests would run through if you changed
to
(The migration test creates migrations for django cms 3.9 which is not due to djangocms_picture. From my point of view it should be sufficient to test if this app has all migrations it needs.) |
@fsbraun Thanks for the suggestions on test fail. But I still dont understand why I need to do changes on test_migrations.py since I didn't change anything related to the database. |
@fabien-michel the suggestion to make the change is because the test is failing due to external apps creating migration files. So making the change suggested by @fsbraun causes the test to only try to create migrations for this app. |
self.picture.width (and height) are now float (since django-filer PR#1226)
Description
Since the following django-filer PR: django-cms/django-filer#1226
the
FilerImageField
width and height are now float.We expect
get_size
to return always int.Related resources
#108
Checklist
master
Slack to find a “pr review buddy” who is going to review my pull request.