Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion bullet/problems/logic/upload.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}.")
Expand Down
3 changes: 1 addition & 2 deletions bullet/problems/templates/archive/problems.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ <h2 class="text-2xl md:text-4xl mt-4 mb-4 md:mb-16">{{ competition.name }}</h2>
{% for problem in object_list %}
<article class="my-8 max-w-prose mx-auto px-2">
<h2 class="font-bold text-lg">
{% problem_number problem categories as problem_number %}
{% blocktranslate with n=problem_number %}Problem {{ n }}{% endblocktranslate %}
{% blocktranslate with n=problem.problem.number %}Problem {{ n }}{% endblocktranslate %}
</h2>
<div class="prose prose-archive">
{{ problem.statement|safe }}
Expand Down