def get_optimised_contest_trace(self, contest_type, trace_type): from skylines.model.trace import Trace return Trace.query(contest_type=contest_type, trace_type=trace_type, flight=self).first()