Merge branch 'develop' of gimli.ms.mff.cuni.cz:/akce/mam/git/mamweb into develop
This commit is contained in:
commit
9f4be74e7e
2 changed files with 10 additions and 0 deletions
|
@ -6,6 +6,7 @@ import tempfile
|
|||
import logging
|
||||
|
||||
from django.contrib.sites.shortcuts import get_current_site
|
||||
from django.core.files.storage import FileSystemStorage
|
||||
from django.db import models
|
||||
from django.utils import timezone
|
||||
from django.conf import settings
|
||||
|
|
|
@ -309,6 +309,15 @@ def podproblemy_v_cislu(cislo, problemy=None, hlavni_problemy=None):
|
|||
else:
|
||||
podproblemy[-1].append(problem)
|
||||
|
||||
for podproblem in podproblemy.keys():
|
||||
def int_or_zero(p):
|
||||
try:
|
||||
return int(p.kod)
|
||||
except ValueError:
|
||||
return 0
|
||||
|
||||
podproblemy[podproblem] = sorted(podproblemy[podproblem], key=int_or_zero)
|
||||
|
||||
return podproblemy
|
||||
|
||||
class TypDeadline(Enum):
|
||||
|
|
Loading…
Reference in a new issue