def serialize_program_search(self, program): obj, *_ = ProgramDocument.search().filter('term', uuid=program.uuid).execute() return serializers.TypeaheadProgramSearchSerializer(obj).data
def serialize_program_search(self, program): obj = SearchQuerySet().models(Program).filter(uuid=program.uuid)[0] return serializers.TypeaheadProgramSearchSerializer(obj).data