Line 131 was if member.team == ..... With member = request.user => Crash if user is not authenticated. FIXED.