-
Notifications
You must be signed in to change notification settings - Fork 299
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix 500 on templates when slack or tg integration is disabled #2064
Fix 500 on templates when slack or tg integration is disabled #2064
Conversation
@@ -325,9 +325,7 @@ def _handle_core_template_updates(self, data, ret): | |||
"""Update core templates if needed.""" | |||
errors = {} | |||
|
|||
core_template_names = self.CORE_TEMPLATE_NAMES |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to remove CORE_TEMPLATE_NAMES too?
@@ -343,7 +341,7 @@ def _handle_core_template_updates(self, data, ret): | |||
|
|||
def to_representation(self, obj): | |||
ret = super().to_representation(obj) | |||
ret = self._get_templates_to_show(ret) | |||
# ret = self._get_templates_to_show(ret) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
left comment
if we don't need it _get_templates_to_show function can be removed
@@ -343,7 +324,6 @@ def _handle_core_template_updates(self, data, ret): | |||
|
|||
def to_representation(self, obj): | |||
ret = super().to_representation(obj) | |||
ret = self._get_templates_to_show(ret) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we need this function anymore?
What this PR does
Continue the work, started in #2061.
Check if slack or telegram integration is enabled to include related templates in the response
Which issue(s) this PR fixes
#1889
Checklist