FIX: Group reports downloads (#213)

We were not passing the correct arguments through in the group reports template causing the download url to default to an admin route. This made downloads unavailable to non-admin users. Fixed by passing the correct values through.
This commit is contained in:
Isaac Janzen 2022-12-30 10:26:14 -06:00 committed by GitHub
parent f5cd03a451
commit 27b30b5efb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -210,8 +210,8 @@ export default class QueryResult extends Component {
}
_download_url() {
return this.group
? `/g/${this.group.name}/reports/`
return this.args.group
? `/g/${this.args.group.name}/reports/`
: "/admin/plugins/explorer/queries/";
}

View File

@ -31,7 +31,7 @@
{{#if results}}
<div class="query-results">
{{#if showResults}}
{{query-result query=model content=results group=group}}
<QueryResult @query={{model}} @content={{results}} @group={{group}} />
{{else}}
{{#each results.errors as |err|}}
<pre class="query-error"><code>{{~err}}</code></pre>