diff --git a/bullet/problems/logic/upload.py b/bullet/problems/logic/upload.py index 02c10d7a..9c23f6d6 100644 --- a/bullet/problems/logic/upload.py +++ b/bullet/problems/logic/upload.py @@ -70,7 +70,7 @@ def _import_problem(competition: "Competition", language: str, problem_dir: Path - solution.html """ problem = Problem.objects.filter( - competition=competition, name=problem_dir.name + competition=competition, number=problem_dir.name ).first() if not problem: raise ProblemImportError(f"Could not find related problem for {problem_dir}.") diff --git a/bullet/problems/templates/archive/problems.html b/bullet/problems/templates/archive/problems.html index 1b64cef4..098f05a7 100644 --- a/bullet/problems/templates/archive/problems.html +++ b/bullet/problems/templates/archive/problems.html @@ -24,8 +24,7 @@

{{ competition.name }}

{% for problem in object_list %}

- {% problem_number problem categories as problem_number %} - {% blocktranslate with n=problem_number %}Problem {{ n }}{% endblocktranslate %} + {% blocktranslate with n=problem.problem.number %}Problem {{ n }}{% endblocktranslate %}

{{ problem.statement|safe }}