mirror of
				https://gitlab.com/animath/si/plateforme.git
				synced 2025-11-04 05:42:12 +01:00 
			
		
		
		
	health_sheet field is now in StudentRegistration
This commit is contained in:
		@@ -486,7 +486,7 @@ class HealthSheetView(LoginRequiredMixin, View):
 | 
				
			|||||||
        path = f"media/authorization/health/{filename}"
 | 
					        path = f"media/authorization/health/{filename}"
 | 
				
			||||||
        if not os.path.exists(path):
 | 
					        if not os.path.exists(path):
 | 
				
			||||||
            raise Http404
 | 
					            raise Http404
 | 
				
			||||||
        student = ParticipantRegistration.objects.get(health_sheet__endswith=filename)
 | 
					        student = StudentRegistration.objects.get(health_sheet__endswith=filename)
 | 
				
			||||||
        user = request.user
 | 
					        user = request.user
 | 
				
			||||||
        if not (student.user == user or user.registration.is_admin or user.registration.is_volunteer and student.team
 | 
					        if not (student.user == user or user.registration.is_admin or user.registration.is_volunteer and student.team
 | 
				
			||||||
                and student.team.participation.tournament in user.registration.organized_tournaments.all()):
 | 
					                and student.team.participation.tournament in user.registration.organized_tournaments.all()):
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user