We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 27734a0 commit 8b3b6fdCopy full SHA for 8b3b6fd
src/routes/settings/+page.svelte
@@ -45,15 +45,17 @@
45
cacheDirError = '';
46
const headers = new Headers();
47
headers.set('Content-Type', 'application/json');
48
- const payload = nullifyEmptyStrings({
49
- slurm_accounts: slurmAccounts,
50
- cache_dir: cacheDir
51
- });
+ const payload = {
+ slurm_accounts: slurmAccounts
+ };
+ if ($page.data.runnerBackend === 'slurm') {
52
+ payload.cache_dir = cacheDir;
53
+ }
54
const response = await fetch(`/api/auth/current-user/settings`, {
55
method: 'PATCH',
56
credentials: 'include',
57
headers,
- body: JSON.stringify(payload)
58
+ body: JSON.stringify(nullifyEmptyStrings(payload))
59
});
60
const result = await response.json();
61
if (response.ok) {
0 commit comments