Merge branch 'tex-upload' into stable
This commit is contained in:
		
						commit
						5bb3a908bf
					
				
					 1 changed files with 4 additions and 2 deletions
				
			
		|  | @ -786,7 +786,7 @@ def texUploadView(request): | |||
|         meta = json.loads(q["meta"]) | ||||
|         html = q["html"] | ||||
| 
 | ||||
|         if meta["typ"] in ["uloha", "serial", "reseni"]: | ||||
|         if meta["typ"] in ["uloha", "serial", "reseni", "tema"]: | ||||
| 
 | ||||
|             # Uložíme soubory | ||||
|             if meta["typ"] != "reseni": | ||||
|  | @ -801,6 +801,7 @@ def texUploadView(request): | |||
|                 "uloha": Problem.TYP_ULOHA, | ||||
|                 "serial": Problem.TYP_SERIAL, | ||||
|                 "reseni": Problem.TYP_ULOHA, | ||||
|                 "tema": Problem.TYP_TEMA, | ||||
|             } | ||||
|             problem_typ = typy[meta["typ"]] | ||||
| 
 | ||||
|  | @ -852,7 +853,8 @@ def texUploadView(request): | |||
|             else: | ||||
|                 problem.text_zadani = html | ||||
|                 problem.nazev = meta["nazev"] | ||||
|                 problem.body = meta["body"] | ||||
|                 if meta["typ"] != "tema": | ||||
|                     problem.body = meta["body"] | ||||
| 
 | ||||
|             problem.save() | ||||
|             cislo.faze = cislo.FAZE_NAHRANO | ||||
|  |  | |||
		Loading…
	
		Reference in a new issue
	
	 Matěj Kocián
						Matěj Kocián