backport of commit 2e254112f555c73eca98b0b7d599cd8e58ddf3a7 (#19143)

Co-authored-by: Phil Renaud <phil.renaud@hashicorp.com>
This commit is contained in:
hc-github-team-nomad-core 2023-11-29 08:34:33 -06:00 committed by GitHub
parent a0a1f0bf4f
commit dd381f8fde
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 1 deletions

3
.changelog/19139.txt Normal file
View File

@ -0,0 +1,3 @@
```release-note:bug
ui: Fixed an issue where purging a job with a namespace did not process correctly
```

View File

@ -44,7 +44,12 @@ export default class JobAdapter extends WatchableNamespaceIDs {
}
purge(job) {
const url = this.urlForFindRecord(job.get('id'), 'job') + '?purge=true';
const url = addToPath(
this.urlForFindRecord(job.get('id'), 'job'),
'',
'purge=true'
);
return this.ajax(url, 'DELETE');
}