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:
parent
f5cd03a451
commit
27b30b5efb
|
@ -210,8 +210,8 @@ export default class QueryResult extends Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
_download_url() {
|
_download_url() {
|
||||||
return this.group
|
return this.args.group
|
||||||
? `/g/${this.group.name}/reports/`
|
? `/g/${this.args.group.name}/reports/`
|
||||||
: "/admin/plugins/explorer/queries/";
|
: "/admin/plugins/explorer/queries/";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
{{#if results}}
|
{{#if results}}
|
||||||
<div class="query-results">
|
<div class="query-results">
|
||||||
{{#if showResults}}
|
{{#if showResults}}
|
||||||
{{query-result query=model content=results group=group}}
|
<QueryResult @query={{model}} @content={{results}} @group={{group}} />
|
||||||
{{else}}
|
{{else}}
|
||||||
{{#each results.errors as |err|}}
|
{{#each results.errors as |err|}}
|
||||||
<pre class="query-error"><code>{{~err}}</code></pre>
|
<pre class="query-error"><code>{{~err}}</code></pre>
|
||||||
|
|
Loading…
Reference in New Issue