mirror of
				https://gitlab.crans.org/bde/nk20
				synced 2025-11-04 09:12:11 +01:00 
			
		
		
		
	Don't check if the user is a member of the parent club if there is no parent club
This commit is contained in:
		@@ -635,7 +635,7 @@ class ClubAddMemberView(ProtectQuerysetMixin, ProtectedCreateView):
 | 
				
			|||||||
            error = True
 | 
					            error = True
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        # Must join the parent club before joining this club, except for the Kfet club where it can be at the same time.
 | 
					        # Must join the parent club before joining this club, except for the Kfet club where it can be at the same time.
 | 
				
			||||||
        if club.name != "Kfet" and not Membership.objects.filter(
 | 
					        if club.name != "Kfet" and club.parent_club and not Membership.objects.filter(
 | 
				
			||||||
                user=form.instance.user,
 | 
					                user=form.instance.user,
 | 
				
			||||||
                club=club.parent_club,
 | 
					                club=club.parent_club,
 | 
				
			||||||
                date_start__lte=club.parent_club.membership_start,
 | 
					                date_start__lte=club.parent_club.membership_start,
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user