[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#76745
Signed-off-by:
Nicolas Lempereur (nle) <nle@odoo.com>
Loading
Please register or sign in to comment