Skip to content

Commit c175942

Browse files
authored
Merge pull request #2276 from codalab/improve-submission-upload
Clean minor code logic problems in submission_upload.tag
2 parents 56e45d8 + c4b28e9 commit c175942

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/static/riot/competitions/detail/submission_upload.tag

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@
269269
self.handle_websocket(event_data.submission_id, data)
270270
}
271271
})
272-
self.detailed_result_urls[submission_id] = detailed_result_url
272+
self.detailed_result_urls[event_data.submission_id] = detailed_result_url
273273
self.update()
274274
break
275275
case 'message':
@@ -443,7 +443,7 @@
443443
}
444444
}
445445
}
446-
return form_json === {} ? null : form_json
446+
return _.isEmpty(form_json) ? null : form_json
447447
}
448448

449449
self.upload = function () {
@@ -472,7 +472,7 @@
472472
self.lines = {}
473473
let dropdown = $('#organization_dropdown')
474474
let organization = dropdown.dropdown('get value')
475-
if(organization === 'add_organization' | organization === 'None'){
475+
if(organization === 'add_organization' || organization === 'None'){
476476
organization = null
477477
}
478478
dropdown.attr('disabled', 'disabled')

0 commit comments

Comments
 (0)