refactor: add js_module_name attribute to MakoTemplateBlockBase
In the previous commit `js_module_name = None` was removed from HTMLSnippet class, because it's not being used by this class, or the classes that inherit from it. But `js_module_name` is used in MakoTemplateBlockBase. Not all classes that inherit from MakoTemplateBlockBase define this attribute, since the same classes inherit from HTMLSnippet class, which used to provide a fallback for this attribute. To prevent `AttributeError`, defining the default value of `None` in MakoTemplateBlockBase.
This commit is contained in:
@@ -41,6 +41,8 @@ class MakoTemplateBlockBase:
|
||||
"""
|
||||
# pylint: disable=no-member
|
||||
|
||||
js_module_name = None
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
super().__init__(*args, **kwargs)
|
||||
if getattr(self.runtime, 'render_template', None) is None:
|
||||
|
||||
Reference in New Issue
Block a user