Pavel "LEdoian" Turinsky
2 years ago
1 changed files with 20 additions and 0 deletions
@ -0,0 +1,20 @@ |
|||||
|
with transaction.atomic(): |
||||
|
assert t.id == 2365 |
||||
|
pfx = f"{t.nazev}, " |
||||
|
# Problémy |
||||
|
for k, b in [(4,3)]: |
||||
|
u = m.Uloha.objects.create( |
||||
|
nadproblem=t, |
||||
|
nazev=pfx + f"{'úloha' if b is not None else 'problém'} {k}", |
||||
|
autor=t.autor, |
||||
|
garant=t.garant, |
||||
|
max_body=b, |
||||
|
cislo_zadani=m.Cislo.get(28, 5), |
||||
|
kod=k, |
||||
|
stav=m.Problem.STAV_ZADANY, |
||||
|
) |
||||
|
u.opravovatele.set(t.opravovatele.all()) |
||||
|
print(u, u.max_body) |
||||
|
input("rly?") |
||||
|
|
||||
|
|
Loading…
Reference in new issue