Skip to content
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

Merged
merged 5 commits into from
May 31, 2023

Conversation

Konstantinov-Innokentii
Copy link
Member

@Konstantinov-Innokentii Konstantinov-Innokentii commented May 31, 2023

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

  • Unit, integration, and e2e (if applicable) tests updated

@Konstantinov-Innokentii Konstantinov-Innokentii requested a review from a team May 31, 2023 04:24
@Konstantinov-Innokentii Konstantinov-Innokentii added the pr:no public docs Added to a PR that does not require public documentation updates label May 31, 2023
@@ -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
Copy link
Contributor

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)
Copy link
Contributor

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)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Konstantinov-Innokentii Konstantinov-Innokentii added this pull request to the merge queue May 31, 2023
Merged via the queue into dev with commit 528529d May 31, 2023
@Konstantinov-Innokentii Konstantinov-Innokentii deleted the fix_templates_for_disabled_integrations branch May 31, 2023 08:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr:no public docs Added to a PR that does not require public documentation updates
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants