Fix migrace: cislo_body může být None
This commit is contained in:
		
							parent
							
								
									ad1b0e238c
								
							
						
					
					
						commit
						ffab712aec
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		|  | @ -11,7 +11,7 @@ def prirad_deadliny(apps, schema_editor): | |||
|     Deadline = apps.get_model('seminar', 'Deadline') | ||||
| 
 | ||||
|     for h in Hodnoceni.objects.all(): | ||||
|         if h.cislo_body.rocnik.rocnik < 26: | ||||
|         if h.cislo_body is not None and h.cislo_body.rocnik.rocnik < 26: | ||||
|             # Deadline připravený v minulé migraci | ||||
|             h.deadline_body = h.cislo_body.deadline_v_cisle.get() | ||||
|             h.save() | ||||
|  |  | |||
		Loading…
	
		Reference in a new issue