Skip to content
Snippets Groups Projects
Commit 4fb96d53 authored by Nasreddin Boulif (bon)'s avatar Nasreddin Boulif (bon)
Browse files

[FIX] website_slides: Don't set completion_time for encrypt/corrupt PDF


Steps to reproduce:

  - Install eLearning module
  - Go to eLearning, open course Basics of Gardening and edit it
  - Click on `How to Grow and Harvest The Best Strawberries | Basics`
  - Upload an encrypted PDF as Attachement

Issue:

  Traceback is raised :
  utils.PdfReadError("File has not been decrypted")

Cause:

  When trying to calculate `completion_time` to read pages, we try to
  get the number of pages of the pdf but an error will be raised if the
  pdf is encrypted.

Solution:

  If not possible to get number of pages, we dont set/update the
  completion_time.

opw-2612529

closes odoo/odoo#78997

X-original-commit: 8eac4109
Signed-off-by: default avatarNicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: default avatarNasreddin Boulif (bon) <bon@odoo.com>
parent b713163b
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment