Skip to content

Commit 3948afd

Browse files
committed
[export] Also check the id field of a CCS problem to see if it already exists
In DOMjudge 8.4, entities will always be identified by a string rather than an auto-incrementing number.
1 parent f9ce31c commit 3948afd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bin/export.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -527,7 +527,7 @@ def get_problems():
527527
def get_problem_id(problem):
528528
nonlocal ccs_problems
529529
for p in ccs_problems:
530-
if p['short_name'] == problem.name or p.get('externalid') == problem.name:
530+
if problem.name in [p.get('short_name'), p.get('id'), p.get('externalid')]:
531531
return p['id']
532532

533533
for problem in problems:

0 commit comments

Comments
 (0)