Skip to content

Commit

Permalink
sim: jobs: ui: fix displaying "problem: " without problem id for some…
Browse files Browse the repository at this point in the history
… Add Problem jobs
  • Loading branch information
varqox committed Dec 3, 2024
1 parent 7075200 commit 9c56f7d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions subprojects/sim/src/web_server/static/kit/scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -2400,8 +2400,10 @@ function JobsLister(elem, query_url, {
case 'delete_problem':
case 'change_problem_statement':
case 'reset_problem_time_limits_using_model_solution':
info_div.appendChild(elem_with_text('label', 'problem'));
info_div.appendChild(a_view_button(url_submission(job.problem_id), job.problem_id, undefined, view_problem.bind(null, true, job.problem_id))); // TODO: refactor it
if (job.problem_id != null) { // Can be null for not-done add_problem job
info_div.appendChild(elem_with_text('label', 'problem'));
info_div.appendChild(a_view_button(url_submission(job.problem_id), job.problem_id, undefined, view_problem.bind(null, true, job.problem_id))); // TODO: refactor it
}
break;
case 'reselect_final_submissions_in_contest_problem':
case 'delete_contest_problem':
Expand Down

0 comments on commit 9c56f7d

Please sign in to comment.