[Emergency] Uncaught Error: Call to a member function DownloadDrawCSV() on null

GET /fixtures-and-results/indoor-netball-fixtures/csv/118/draw

Line 47 in /opt/bitnami/apps/silverstripe/htdocs/app/src/SportPageController.php

Source

38 			$grade = $this->Grades()->filter(['ID' => $id])->first();
39 		} else {
40 			return [];
41 		}
42 
43 		switch ($request->param('CSVType')){
44 			case 'results':
45 				return $grade->DownloadResultsCSV();
46 			case 'draw':
47 				return $grade->DownloadDrawCSV();
48 		}
49 
50 		return null;
51 	}
52 
53 

Trace