Skip to content

Commit

Permalink
[FIX]attachment_preview: get preview for files in db only
Browse files Browse the repository at this point in the history
  • Loading branch information
PicchiSeba committed May 13, 2024
1 parent 3ba1e00 commit 244c967
Showing 1 changed file with 3 additions and 1 deletion.
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

0 comments on commit 244c967

Please sign in to comment.