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

[14.0][FIX]attachment_preview: get preview for files in db only #485

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions attachment_preview/readme/CONTRIBUTORS.rst
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
* Holger Brunn <[email protected]>
* Dennis Sluijk <[email protected]>
* Sebastiano Picchi <[email protected]>
4 changes: 3 additions & 1 deletion attachment_preview/static/src/js/attachment_preview.js
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,9 @@ odoo.define("/attachment_preview/static/src/js/attachment_preview.js", function

attachments = _.object(
attachments.map((att) => {
return parseInt(att.localId.slice(16), 10);
const tmp_id = parseInt(att.localId.slice(16), 10);
if (tmp_id > 0) return tmp_id;
return null;
}),
attachments.map((at) => {
if (at.defaultSource) {
Expand Down
Loading