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

10.0-ir_attachment_url-image_resize_fix #681

Merged
merged 1 commit into from Nov 21, 2018

Conversation

Projects
None yet
2 participants
@RafiZz
Member

RafiZz commented Nov 14, 2018

When the "image_resize_image" function was called, they received the error "binascii.Error: decoding with base64 codec failed (Error: Incorrect padding)", since the value of the binary field is the URL, not the base_64 string.

@RafiZz RafiZz force-pushed the RafiZz:10.0-fix-ir_attachment_url branch from 1e4c55c to 52e964e Nov 14, 2018

Show resolved Hide resolved ir_attachment_url/doc/changelog.rst
@@ -102,6 +102,8 @@ def binary_content(cls, xmlid=None, model='ir.attachment', id=None, field='datas
with open(module_resource_path, 'rb') as f:
content = base64.b64encode(f.read())
last_update = str(os.path.getmtime(module_resource_path))
# lint error fix
del last_update

This comment has been minimized.

@yelizariev

yelizariev Nov 14, 2018

Member

👎 You shall not assign variable instead

This comment has been minimized.

@RafiZz

RafiZz Nov 14, 2018

Member

Done.

@RafiZz RafiZz force-pushed the RafiZz:10.0-fix-ir_attachment_url branch from 52e964e to b21f22f Nov 14, 2018

@yelizariev

This comment has been minimized.

Member

yelizariev commented Nov 15, 2018

Still

ir_attachment_url/models/ir_http.py:84:13: F841 local variable 'last_update' is assigned to but never used

🚑 when the "image_resize_image" function was called, they received th…
…e error "binascii.Error: decoding with base64 codec failed (Error: Incorrect padding)", since the value of the binary field is the URL, not the base_64 string

@RafiZz RafiZz force-pushed the RafiZz:10.0-fix-ir_attachment_url branch from b21f22f to 8472706 Nov 15, 2018

@yelizariev yelizariev merged commit bc375d9 into it-projects-llc:10.0 Nov 21, 2018

6 checks passed

Hound No violations found. Woof!
ci/branches Branch names are correct
Details
ci/runbot runbot build 24201-681-847270 (runtime 573s)
Details
codecov/patch/backend Coverage not affected.
Details
codecov/patch/tests Coverage not affected.
Details
coverage/coveralls First build on 10.0-fix-ir_attachment_url at 66.366%
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment