Pardon, tahle funkce brala něco jiného než tvrdila
This commit is contained in:
parent
623124e833
commit
e442a87421
1 changed files with 4 additions and 4 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue