Merge pull request #1609 from appwrite/fix-template-permissions

Fix a crash from Perplexity template setup
This commit is contained in:
Darshan authored and GitHub committed 2025-01-13 17:28:53 +05:30
commit b35661abcc
1 file changed
+4 -1
@@ -10,7 +10,10 @@
onMount(() => {
$templateConfig.execute = $template.permissions.includes('any');
templateScopes = scopes
.filter((scope) => $template.scopes.includes(scope.scope))
// hot fix for perplexity chat template,
// backend doesn't have scopes for this template.
// TODO: @itznotabug fix on backend too.
.filter((scope) => ($template.scopes ?? []).includes(scope.scope))
.map((scope) => ({
...scope,
active: true