Skip to content

Commit

Permalink
[FIX] website_slides: prevent exception while accessing embed externa…
Browse files Browse the repository at this point in the history
…l of slide

Currently, an exception is generated when the user tries to access embed view
of slides by following the steps:
 - Install "eLearning" with a demo data
 - Open external embed view of slide 1 by "/slides/embed_external/1" in url

Error:
`AttributeError: 'slide.channel' object has no attribute 'website_share_url'`

This error is because commit [1] added code that tries to access the
'website_share_url' field in the 'slide.channel' model in template
'embed_slide' , but it actually belongs to 'slide.slide'.

This commit resolved the above issue by accessing "website_share_url"
with "slide" instead of "slide.channel".

[1]-db63c03

sentry-5095823727

closes #159442

X-original-commit: e45456a
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
  • Loading branch information
maan-odoo committed Mar 27, 2024
1 parent 7682c4b commit 3abb836
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
<t t-if="is_external_embed">
<t t-call="website_slides.slide_share_modal">
<t t-set="record" t-value="slide"/>
<t t-set="website_share_url" t-value="slide.channel_id.website_share_url"/>
<t t-set="website_share_url" t-value="slide.website_share_url"/>
<t t-set="include_embed" t-value="True"/>
<t t-set="embed_hide_starting_page" t-value="True"/>
</t>
Expand Down

0 comments on commit 3abb836

Please sign in to comment.