-
Notifications
You must be signed in to change notification settings - Fork 23
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
Remove image cache #113
Remove image cache #113
Conversation
after this change, the image is working again: https://www.conversaafiada.com.br/brasil/melhor-discurso-do-lula-nao-vao-me-destruir |
4a476ef
to
886bb35
Compare
CHANGES.rst
Outdated
@@ -6,6 +6,9 @@ There's a frood who really knows where his towel is. | |||
2.11 (unreleased) | |||
^^^^^^^^^^^^^^^^^ | |||
|
|||
- Remove image cache (closes `#109`_). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please write a proper changelog entry.
view, field = get_images_view(context) | ||
if view: | ||
view, field = get_images_view(context) | ||
img = None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there's no need to initialize this variable here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, there is. In some case running in production the view or sizes object is None, and the method try to return a variable not initialized, resulting in an exception.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that variable is already set in lines 36, 52 and 54; there is no need to initialize it here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hvelarde are you considering when view variable is None? I swear to you I did this because there was an exception without it, and this fixes the exception. you can check in the logs.
Also I don't want to move too much code in this PR, we have other issue for this.
30b6c8b
to
f753e78
Compare
closes #109