[website] [slideshow] clear website cache on update of a slide show
diff --git a/website/doctype/website_slideshow/website_slideshow.py b/website/doctype/website_slideshow/website_slideshow.py
index 928aa9f..86bd2a0 100644
--- a/website/doctype/website_slideshow/website_slideshow.py
+++ b/website/doctype/website_slideshow/website_slideshow.py
@@ -5,4 +5,9 @@
class DocType:
def __init__(self, d, dl):
- self.doc, self.doclist = d, dl
\ No newline at end of file
+ self.doc, self.doclist = d, dl
+
+ def on_update(self):
+ # a slide show can be in use and any change in it should get reflected
+ from webnotes.webutils import clear_cache
+ clear_cache()
\ No newline at end of file
diff --git a/website/templates/html/slideshow.html b/website/templates/html/slideshow.html
index e0e9038..b26338c 100644
--- a/website/templates/html/slideshow.html
+++ b/website/templates/html/slideshow.html
@@ -8,7 +8,7 @@
{% if slide.heading or slide.description %}
<div class="carousel-caption">
{% if slide.heading %}<h4>{{ slide.heading }}</h4>{% endif %}
- {% if slide.heading %}<p>{{ slide.description }}</p>{% endif %}
+ {% if slide.description %}<p>{{ slide.description }}</p>{% endif %}
</div>
{% endif %}
</div>