Skip to content

Commit 06396ca

Browse files
committed
Fix: UI properties were being sent when spinning up a new job
Signed-off-by: worksofliam <[email protected]>
1 parent 33b22c5 commit 06396ca

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

src/connection/sqlJob.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@ export class OldSQLJob extends SQLJob {
151151

152152
const props = Object
153153
.keys(this.options)
154+
.filter(prop => this.options[prop] !== `` && this.options[prop] !== null && this.options[prop] !== undefined) // 0 is valid
154155
.map(prop => {
155156
if (Array.isArray(this.options[prop])) {
156157
return `${prop}=${(this.options[prop] as string[]).join(`,`)}`;

src/views/jobManager/jobManagerView.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,11 @@ export class JobManagerView implements TreeDataProvider<any> {
3636
}),
3737

3838
vscode.commands.registerCommand(`vscode-db2i.jobManager.newJob`, async (options?: JDBCOptions, name?: string) => {
39+
if (options && 'contextValue' in options) {
40+
// This happens because the button is clickable from the Job Manager title bar.
41+
options = undefined;
42+
}
43+
3944
try {
4045
updateStatusBar({newJob: true});
4146
await JobManager.newJob(

0 commit comments

Comments
 (0)