fixed error on new overlay api
This commit is contained in:
parent
1e389c25d8
commit
f52df88cd6
@ -166,5 +166,7 @@ class Overlay(object):
|
||||
return self.get_projector_html()
|
||||
|
||||
def is_active(self):
|
||||
return (self.name in config['projector_active_overlays'] and
|
||||
self.get_projector_html() is not None)
|
||||
return self.name in config['projector_active_overlays']
|
||||
|
||||
def show_on_projector(self):
|
||||
return self.is_active and self.get_projector_html() is not None
|
||||
|
@ -86,7 +86,7 @@ class Projector(TemplateView, AjaxMixin):
|
||||
# Do not show overlays on slide preview
|
||||
if self.kwargs['sid'] is None:
|
||||
for receiver, overlay in projector_overlays.send(sender=self):
|
||||
if overlay.is_active():
|
||||
if overlay.show_on_projector():
|
||||
data['overlays'].append({'name': overlay.name,
|
||||
'html': overlay.get_projector_html()})
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user