Web M&M
https://mam.matfyz.cz
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
547 B
20 lines
547 B
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?")
|
|
|
|
|
|
|