|
|
@ -354,14 +354,14 @@ class VysledkovkaCisla(Vysledkovka): |
|
|
|
return len(self.hlavni_problemy) - len(self.temata_a_spol) > 0 |
|
|
|
|
|
|
|
@cached_property |
|
|
|
def podproblemy(self) -> list[list[m.Problem]]: |
|
|
|
podproblemy = {hp.id: [] for hp in self.hlavni_problemy} |
|
|
|
hlavni_problemy = set(self.hlavni_problemy) |
|
|
|
def podproblemy(self) -> dict[int, list[m.Problem]]: |
|
|
|
podproblemy = {hp.id: [] for hp in self.temata_a_spol} |
|
|
|
temata_a_spol = set(self.temata_a_spol) |
|
|
|
podproblemy[-1] = [] |
|
|
|
|
|
|
|
for problem in self.problemy: |
|
|
|
h_problem = problem.hlavni_problem |
|
|
|
if h_problem in hlavni_problemy: |
|
|
|
if h_problem in temata_a_spol: |
|
|
|
podproblemy[h_problem.id].append(problem) |
|
|
|
else: |
|
|
|
podproblemy[-1].append(problem) |
|
|
|